Search found 63 matches

by EmmBee
Wed Apr 26, 2017 2:07 pm
Forum: Software & Programming
Topic: Listing unset variables
Replies: 4
Views: 281

Re: Listing unset variables

Never needed it myself, but it would be an interesting exercise to similarly dump list of all set variable names and their values. Not sure if it has already been done? Where this could come in very handy is when debugging a program, and you wish to get the values of some variables in order to find...
by EmmBee
Sun Apr 23, 2017 11:29 am
Forum: Software & Programming
Topic: QPC2 Windows Quirk
Replies: 2
Views: 168

Re: QPC2 Windows Quirk

Hi Steve,

This is interesting. It could be caused by something to do with SMSQ/E's Window manager.
Or it could be to do with the colours being used. Can you please give us more details of how your version of QPC2 is setup,
and the exact code you're using, so that we can replicate it.

EmmBee
by EmmBee
Sat Apr 22, 2017 6:58 pm
Forum: Software & Programming
Topic: (Nearly) solved: FuNction which tests if a variable is set
Replies: 22
Views: 958

Re: (Nearly) solved: FuNction which tests if a variable is set

Hi again, Well, I've tested this "typo" program out, and have to report that it doesn't work. It does not recognise any typing mistakes. As far as I can gather, SMSQ/E forgets about them. As I see matters, scanning through the name table is not the answer. I believe we will have to resort ...
by EmmBee
Sat Apr 22, 2017 3:41 pm
Forum: Software & Programming
Topic: (Nearly) solved: FuNction which tests if a variable is set
Replies: 22
Views: 958

Re: (Nearly) solved: FuNction which tests if a variable is set

Have you thought out how this could be done? I was only considering just scanning SuperBASIC name table and list out names of unset variables. Easily done, soon... I agree, this would be the easiest solution. I've written a rough version. It scans through the name table looking for simple float or ...
by EmmBee
Fri Apr 21, 2017 1:20 pm
Forum: Software & Programming
Topic: (Nearly) solved: FuNction which tests if a variable is set
Replies: 22
Views: 958

Re: (Nearly) solved: FuNction which tests if a variable is set

Re SMSQ/E BASIC unset variables: As much as I love SMSQ/E Basic, I dislike the way unset variables default to zero. I have almost teared my hair out trying to find a bug in a large listing, only to eventually find it was a simple typo in a long variable name. Tempted to write procedure to list unse...
by EmmBee
Fri Apr 21, 2017 12:09 pm
Forum: Software & Programming
Topic: (Nearly) solved: FuNction which tests if a variable is set
Replies: 22
Views: 958

Re: (Nearly) solved: FuNction which tests if a variable is set

Yes, I have tested it. PARUSE is also working outside functions. Unfortunately it has a bug (on Minerva and SMSQ/E): Because of the bug in PARUSE, we could instead use Jan's earlier formula, and have code such as ... IF BASIC_INDEX%("x_%")<0:PRINT#0,"x_% (or y_%) not set! Aborting&qu...
by EmmBee
Thu Apr 20, 2017 12:00 am
Forum: Software & Programming
Topic: (Nearly) solved: FuNction which tests if a variable is set
Replies: 22
Views: 958

Re: (Nearly) solved: FuNction which tests if a variable is set

Is there a S(uper)BASIC-function which tests if a variable is set? e.g.: REMark Turbo Toolkit required for END_CMD IF NOT variableSet(a_%):END_CMD REMark Alternative: IF NOT variableSet("a_%"):END_CMD REMark Continue with command file only if a_% is set REMark ... (your commands) END_CMD ...
by EmmBee
Wed Apr 19, 2017 4:42 pm
Forum: Software & Programming
Topic: (Nearly) solved: FuNction which tests if a variable is set
Replies: 22
Views: 958

Re: (Nearly) solved: FuNction which tests if a variable is set

Is there a S(uper)BASIC-function which tests if a variable is set? The DIY toolkit volume "P" has a function called "UNSET". See: http://www.dilwyn.me.uk/tk/index.html This returns 1 if no value has been set, otherwise 0. E.g. okay = NOT UNSET(var%) If there are commands (I don'...
by EmmBee
Tue Mar 21, 2017 1:35 pm
Forum: Software & Programming
Topic: VAL function in SuperBasic
Replies: 14
Views: 1008

Re: VAL function in SuperBasic

Perhaps experimenting with the keyboard settings on QPC2's front panel could make a difference to the keyboard queue handling. Taking Steve's idea a bit further, we can implement a more robust version of VAL by using S*BASIC's coercion ability, to return any data type, coerced into a string. If our ...
by EmmBee
Sun Mar 19, 2017 11:55 pm
Forum: Software & Programming
Topic: VAL function in SuperBasic
Replies: 14
Views: 1008

Re: VAL function in SuperBasic

Hi all, I can recommend this attempt at an expression evaluator ... DEFine FuNction VAL(x$) LOCal result result = 0 IF x$ <> FILL$(" ",LEN(x$)) COMMAND_LINE TYPE_IN "result = " & x$ & CHR$(10) TYPE_IN "CONTINUE" & CHR$(10) STOP END IF RETurn result END DEFin...

Go to advanced search