Thanksdilwyn wrote:<>Neat, although what is JVA_SGET? Is it a SMSQmulator specific Java command?

Thanksdilwyn wrote:<>Neat, although what is JVA_SGET? Is it a SMSQmulator specific Java command?
I promise you wont be happy without the "JVA Syncscrap job" in the long run..Silvester wrote:That's very useful, thanks, Per. Whats puzzling is that I don't need to use EMU_SYNCSCRAP, to start a job, it just appears to work without it.
Ive never been able to use this key combination in SMSQmulator under Windows, let alone with a wireless keyboard.Silvester wrote:BTW anyone else lost the use of reset with ALT+CTRL+SHIFT+TAB when using wireless keyboard?
Code: Select all
12FEB 123.45 OVH- A1,STAT,V;PAPER FROM RYMAN'S;CC1
12FEB JOB1,12.45+45.56+(34*2)
Code: Select all
Open #2,scr_300x12a200x300
Open #3,con_300x120a200x312
Paper #2,7 : Ink #2,0 : Cls #2 : Border #2,1,0
Paper #3,7 : Ink #3,0 : Cls #3 : Border #3,1,0
At #2,0,17 : Print #2, "Example of VALID%"
At #3,1,10 : Print #3, "Type to test Press x to quit"
Rep p
At #3,4,4 : Input #3,a$
t=VALID%(3,a$)
At #3,6,4 : Print #3," " : At #3,6,4 : Print #3,a$,t
If a$="x" : Exit p
End Rep p
rem: Tried to use VALID% to determine if a string is a valid number
rem: and failed. What am I doing wrong?
rem: note if VALID_bin not installed then runtime error = 19; Indices wrong
rem: Odd results as follows:-
rem: Any valid number returns 1, including numbers starting with a + or -
rem: Any string starting with a non numeric character returns 0. Except +-
rem: Any string starting with a number returns 1!!
I fixed it for you! (With the use of my moderator's hat!)tinyfpga wrote:One can see that I have no idea how to post SB source or object code. I can't find instructions on how to do this on this forum.
Code: Select all
[code]Your code goes here
VALID% is incredibly lazy! It leaves all the hard work to S*BASIC. Anything that S*BASIC will accept is fine with VALID%, so x% = "+4" is fine with S*BASIC, so is fine with VALID% too. But while x%='abc' causes the interpreter to gag, VALID% just tells you that this is an error and continues. Theres an article that describes how VALID% works in numbing detail here.Tinyfpga wrote:I have tried to use the keyword VALID% from the the very good knoware site and I don't knowwhere I have gone wrong.
There are too many different ways to format data, especially when coming from "foreign" sources, that it doesnt make sense to extend VALID% to cover all that. You need to write a bespoke parser for your data. There is some help though. There are a number of other commands on Knoware (and elsewhere, of course) to make string parsing easier. Have you looked at my other string toolkits at Strings and Text? If you can export your data in comma-delimited format you may be able to use IMPARSE to extract one term at a time. That might save some fiddle. But I cant see much regularity, apart from the date, in the data sample above, so that could prove complicated to parse.Tinyfpga wrote:I have been trying to convert various programs I wrote in Microsoft's Visual Basic. All these programs use plain text
entries to describe financial transactions.
Examples as follows:-In Visual Basic it is not too difficult to parse these texts because it is fairly easy to determine if dates, numbers and expressions are valid and expression can be resolved with VB's Evaluation software.<>Code: Select all
12FEB 123.45 OVH- A1,STAT,V;PAPER FROM RYMAN'S;CC1 12FEB JOB1,12.45+45.56+(34*2)
From your attachment:Tinyfpga wrote:Following on from my last post:- How about greatly extending VALID% such that it could validate a larger variety of strings such as dates, formatted numbers (eg. two decimal points) and numerical expressions.
One can see that I have no idea how to post SB source or object code. I can't find instructions on how to do this on this forum. Although I can easily UNZIP programs on SMSQ/E, I am unable to ZIP them.