Re: [Ql-Users] Wishlist of future SuperBASIC extensions...
"2 + 2 = 5 ... for large values of 2" -- old chestnut. Speaking of 5 :-) . -Original Message- >From: Plastic >Sent: Feb 11, 2011 10:06 AM >To: ql-us...@q-v-d.com >Subject: Re: [Ql-Users] Wishlist of future SuperBASIC extensions... > >On Fri, Feb 11, 2011 at 8:51 AM, Malcolm Lear wrote: > >> >> >> On 11/02/2011 14:02, Plastic wrote: >> >>> I wish I could... >>> >>> count++ instead of count = count + 1 >>> count-- instead of count = count - 1 >>> >>> >>> How about count++5 instead of count = count + 5 > > >I'll match your increments and raise you referenced pointers... > >Dave >___ >QL-Users Mailing List >http://www.q-v-d.demon.co.uk/smsqe.htm ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Wishlist of future SuperBASIC extensions...
On 11/02/11 15:06, Plastic wrote: > I'll match your increments and raise you referenced pointers... I'll 'C' your increments and referenced pointers. In fact, I'll C68 them! Cheers, Norman. -- Norman Dunbar Dunbar IT Consultants Ltd Registered address: Thorpe House 61 Richardshaw Lane Pudsey West Yorkshire United Kingdom LS28 7EL Company Number: 05132767 ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Wishlist of future SuperBASIC extensions...
On 11 Feb 2011, at 14:02, Plastic wrote: > I wish I could... > > count++ instead of count = count + 1 > count-- instead of count = count - 1 > Here are two solutions: 1. You could define two procedures Pl and Mi DEFine PROCedure Pl(k) k=k+1 END DEFine DEFine PROCedure Mi(k) k=k-1 END DEFine count++ becomes Pl count count-- becomes Mi count If you use Turbo on these you must add REFERENCE k just above the DEFine lines. 2. You could add two new keywords PL and MI to do the same. These would work with the later versions of Turbo. George ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Wishlist of future SuperBASIC extensions...
On Fri, Feb 11, 2011 at 8:51 AM, Malcolm Lear wrote: > > > On 11/02/2011 14:02, Plastic wrote: > >> I wish I could... >> >> count++ instead of count = count + 1 >> count-- instead of count = count - 1 >> >> >> How about count++5 instead of count = count + 5 I'll match your increments and raise you referenced pointers... Dave ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Wishlist of future SuperBASIC extensions...
On 11/02/2011 14:02, Plastic wrote: I wish I could... count++ instead of count = count + 1 count-- instead of count = count - 1 How about count++5 instead of count = count + 5 Malcolm ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Wishlist of future SuperBASIC extensions...
On Fri, Feb 11, 2011 at 8:16 AM, Rich Mellor wrote: > On 11/02/2011 14:02, Plastic wrote: > >> I wish I could... >> >> count++ instead of count = count + 1 >> count-- instead of count = count - 1 >> > > Not possible without re-writing the BASIC parser... How does Jan Jones sleep at night? ;) > I wish I could... >> >> DEFine PROCedure run_faster(a$) >> REMark Any procedures called with this wrapper will always execute in a >> short enough time ;) >> > > Now that is easy enough: > > > DEFine PROCedure run_faster(a$) > REMark do nothing > END DEFine > So the problem isn't with the code. It's with the problem! > Or, you can use Turbo to compile a suite of procedure and function calls - > not something I have ever used it for, but it's there - plus you can compile > it for speed, rather than memory on the most intensive sections of code. > I have downloaded it. I plan to read the manual tonight. I read it in 1980-something and it made me cry. Hopefully I will do better this time. :) Anyone know what the memory limit on JS ROMs is, and how it exhibits? I configured Q-Emulator to 4MB and wrote a little proggie to copy every 32K page into screen RAM, and it seems to run well, and loop around at 4MB. I notice the SuperBASIC area is... larger. Approx 48K instead of 6K or so. Dave Dave ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Wishlist of future SuperBASIC extensions...
On 11/02/2011 14:02, Plastic wrote: I wish I could... count++ instead of count = count + 1 count-- instead of count = count - 1 Not possible without re-writing the BASIC parser... I wish I could... DEFine PROCedure run_faster(a$) REMark Any procedures called with this wrapper will always execute in a short enough time ;) Now that is easy enough: DEFine PROCedure run_faster(a$) REMark do nothing END DEFine Or, you can use Turbo to compile a suite of procedure and function calls - not something I have ever used it for, but it's there - plus you can compile it for speed, rather than memory on the most intensive sections of code! -- Rich Mellor RWAP Services http://www.rwapsoftware.co.uk http://www.rwapservices.co.uk -- Try out our new site: http://sellmyretro.com ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm