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

Anything QL Software or Programming Related.
EmmBee
Bent Pin Expansion Port
Posts: 81
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

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

Postby EmmBee » Sat Apr 22, 2017 6:58 pm

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 to using the Turbo Parser to warn us about these errors.
This is of course a lot more complicated, but I'll start work on this...

EmmBee


User avatar
ql_freak
Trump Card
Posts: 151
Joined: Sun Jan 18, 2015 1:29 am

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

Postby ql_freak » Sun Apr 23, 2017 5:57 am

What are you "making of" my simple script ;-) It is working fine for me! So don't bother.

My next problem:

It is possible to run the current MasterSpy on high resolution screens. Just set the screen size (interactivly) in MasterSpy. Afterwards delete the "safety" window (this with the full screen size), which guards the MasterSpy CON-channels with the "Channels" menu from Qpac2. MasterSpy is running fine, without covering the whole screen with black. You now see the other programs running on the desktop.

Unfortunately this is not true for Text87 plus 4 e4 (you must use QL-Mode on QPC and enter the command QPC_QLSCREMU 4). DO NOT CLOSE THE GUARDING CHANNEL with size 1024x768 (for a 1024x768 screen/desktop).

What I am planning: Look at the channel table, find the Text87 channels, and resize the guarding channel. Do you think, this may work?

Another solution (if this one does not work) would be (unfortunately we need Marcel for this), is to have a command, which reduces the result, that is returned, if a program asks for the maximum screen size. Then you could write a command file (hypothetically) to start text87 like this:

FAKE_SCR_SiZe 512,480 : REMark even better FAKE_SCR_SiZe 512,480,512,50 (so that text87 is not in top left corner)
ex "text87plus4"
PAUSE 300
FAKE_SCR_OFF
END_CMD


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE§() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
ql_freak
Trump Card
Posts: 151
Joined: Sun Jan 18, 2015 1:29 am

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

Postby ql_freak » Sun Apr 23, 2017 6:05 am

EmmBee wrote:[code]DEFine PROCedure typo
LOCal n_ptr, type, detail, ptr%, name$(127), vv
FOR n_ptr = BASIC_L(24) TO BASIC_L(28) STEP 8
type = BASIC_B%(n_ptr)
detail = BASIC_B%(n_ptr+1)
...
EmmBee

Nice! Unfortunately this cannot be used in a command file (without line numbers), which can be started with "DO".


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE§() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
Silvester
Trump Card
Posts: 185
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

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

Postby Silvester » Mon May 08, 2017 2:06 pm

I've had a look at the source code and WMON only does what the documentation says if an OUTLN has been defined. It tries to cater for all cases, without error, but otherwise can produce unexpected results (as mentioned earlier). It doesn't help either that MODE calls no longer always clears all windows, but perhaps that's a blessing.

Of course, an outline can't be set by default for a SBASIC job because then you couldn't resize windows freely within whole display area.

But once OUTLN is set (or EasyPtr's WMOV / OUTL) if you wanted to resize you'd need to redo primary using OUTLN#0 to encompass proposed #0/#1/#2, and then redefine WINDOW#0/#1/#2 to required size.

The way WMON does it is to scan proposed #0/#1/#2 windows, work out required outline to encompass them all, call IOP.OUTL, and then redo each window with IOW.DEFW. It wouldn't be too difficult to write new procedure which passed integer array for required #0/#1/#2 window definitions and performed the same action. Then you could WMOV Basic around and resize at will :)



Return to “Software & Programming”

Who is online

Users browsing this forum: No registered users and 3 guests