On Tue, 6 Jul 2021, at 3:44 PM, pjwitte via Ql-Users wrote: > On 06/07/2021 16:18, desin via Ql-Users wrote: > > Am 06.07.21 um 15:07 schrieb Graeme Gregory via Ql-Users: > >> > >> > >> On Tue, 6 Jul 2021, at 1:59 PM, desin via Ql-Users wrote: > >>> > >>>> I agree with Francois, using LOOKUP% as alternative for EXISTS. > >>>> I use it a lot. It returns the place in the name table which can > >>>> also be > >>>> used to test for conflicting keywords if found out of place. > >>>> > >>>> Bob > >>>> > >>> on QDOS > >>> Lookup% can not distinguish between > >>> SCR_XLIM and SCRXLIM > >>> http://www.dilwyn.me.uk/tk/scrxlim.zip > >>> > >>> if SCRXLIM_cde is loaded > >>> print Lookup% ("SCR_XLIM") gives 160 > >>> print Lookup% ("SCRXLIM") gives 162 > >>> > >>> conclusion > >>> QDOS -> EXISTS_bin > >>> SMSQE -> Function_code > >>> > >> That looks right to me, assuming uQLx based code. > >> > >> Lookup%(SCR_YLIM) will give 161 (its the last extension installed > >> by uQLx), and SCRXLIM is the first user one at 162. > >> > >> Graeme > >> _______________________________________________ > >> QL-Users Mailing List > >> > > > > > > On the other hand; would it be safe to presume; for all Systems; > > if SCR_XLIM is not present; the default screen resolution is used ? > > > > my reason is a simple system info > > depends on > > Exists_bin > > scrxlim_cde > > > > CLS > > PRINT > > IF EXISTS ("EMU_VER$") : PRINT " SMSQmulator" > > IF EXISTS ("QPC_EXIT") : PRINT " QPC2 "&QPC_ver$ > > IF EXISTS ("UQLX_RELEASE$"): PRINT " UQLX "&UQLX_RELEASE$ > > smsqe% = 0 : min% = 0 : tk% = 0 > > IF "HBA" INSTR VER$ : smsqe% = 1 > > IF "JSL1" INSTR VER$ : min% = 1 > > IF EXISTS ("ED") : tk% = 1 > > IF smsqe% : PRINT " SMSQE " &VER$ (1) > > IF min% : PRINT " Minerva ROM "&VER$ (1) > > IF NOT min% AND NOT smsqe% : PRINT " ";VER$ &" ROM" > > fr_mem%=FREE_MEM/1024 > > IF fr_mem% > 1024:PRINT " "&FDEC$ (fr_mem%/1000,4,1) &" Mb free" > > if fr_mem% <= 1024:PRINT " "&fr_mem%&" Kb free" > > if tk% and not smsqe% : PRINT " Toolkit2 enabled" > > IF EXISTS ("HIS_USE") and not smsqe% : PRINT " History enabled" > > IF exists ("PINFO") and not smsqe% : PRINT " Pointer enabled" > > IF EXISTS ("RAM_USE") and not smsqe% : PRINT " Ramdisk enabled" > > xx%=512:yy%=256 > > IF EXISTS ("SCR_XLIM"):xx%=SCR_XLIM :yy%=SCR_YLIM > > IF EXISTS ("SCRXLIM") :xx%=SCRXLIM(0):yy%=SCRYLIM(0) > > PRINT " Screen "&xx%&"x"&yy% > > > > Markus > > If it were only that easy.. :o( > > I havent gone through all of it, but just a couple of things: > > MACHINE would be better for sorting out wots wot, except not all > systems implement it. However, you can get the same info directly from > the system variables. I dont have the details to hand, but Im sure > someone will produce them any moment now.. > > EMU_VER$ was a result of my nagging to get some semblance of > conformity across the various emulators (Why does each emulator have a > different command to do the same thing!) The idea was that EMU_xxx > would replace JVA_xxx and QPC_xxx and anything else like it. Sadly, > that didnt happen only SMSQmulator complied (but then still kept the > old JVA_xxx) However, one day QPC (and/or any other) may conform and > then BANG! goes your test for SMSQmulator. If you want to do it that > way, better target JVA_VER$. > > Just a wee logical slip up: You cant use FDEC$ unless either TK2 or > SMSQ/E (or some other toolkit I dont know about) are present. >
I can add that to sQLux pretty easilly (the EMU_VER$) any documentation I should read? Graeme _______________________________________________ QL-Users Mailing List