Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / I heard that CONST uses var space...

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. I heard that CONST uses var space...
#4379
Posted by: boltex 2004-06-08 12:26:20
Is that true?

if so, how about some BASIC questions...  :)

I have also learned that it would be best to define types as we assign numbers in rapidQ code like such:

dim a = 200% '(notice symbol after number $%& ?? ect...)

 ' to take less bits in source file &  such or something like that...

Since MACRO preprocesses your code, ... replacing instances of found macro "word" ...

Should we declare constants as so :
MACRO pi 3.1416!

?

or something similar, i might have not put a valid symbol, as i am to lazy to lookup the symbol table.

??????????
--
boltex
Message2. Re: I heard that CONST uses var space...
#4386
Posted by: 2004-06-08 16:58:01
I never bother with types to be honest ..... I mean in this day and age any computer has loads of memory and processor speed so WHY BOTHER?

Now back in the days <gets all old geeky> we had just a tiny amount of space to work with - 1 kilobyte on the Sinclair ZX 81, 3.5 kilobytes on the Commodore VC 20 .... so every byte counted. Heck! Back then I programmed in assembler only because you needed the speed and the memory!

But computers are bolted together from bits (cards for sound, graphics etcetera) that make assembler programming too hard to do. They have memory to spare and speed too, so a high level language like Rapid Q is fine. Again I say; why bother with TYPES? Why I even get so lazy as not to start arrays at the 0 element now!
Message3. Re: I heard that CONST uses var space...
#4392
Posted by: boltex 2004-06-08 22:44:15
i am not talking about types at all ?!?
--
bolt

Guidance, please enlighten us with your wisdom!
Message4. Re: I heard that CONST uses var space...
#4401
Posted by: guidance 2004-06-09 07:08:39
I remember RQ regards default variables and constants as double. If you want other types, many people, including myself, suggest using dim statement, in stead of attaching type symbols, this reduces your typing :) , more important, eases the portability in the future one day.
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Thu 2024-4-25  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0