05-03-2024, 10:58 AM
(05-03-2024, 10:35 AM)Kernelpanic Wrote:(05-03-2024, 09:54 AM)bartok Wrote:There is no difference in the matter. A declaration like "Dim A%" is the way the old Basic freaks write, and it's hard to break away from something like that. The same applies to "Option _Explicit".(05-03-2024, 09:48 AM)SMcNeill Wrote: No bug. That's how BASIC is designed. Just like CONST, once you explicitly define something, it locks out other definitions.So, what's the difference in defining a variable as
DIM A AS INTEGER
compared to
DIM A%
?
It didn't exist in QB, and declarations with "Dim" only had the benefit of not having to constantly write in the program: A% here, A% there, and so on. But spelling mistakes were still not reported.
For example:
Code: (Select All)
'Without -Option _Explicit-, 3. Mai 2024
Dim As Integer eingabe, summme
eingabe = 4
summe = eingabe * 3
Print summe
'Spelling mistake
summe = engabe * 4
Print summe
End
Ok, thank's. In order to not use A% here, and A% there, but only A instead, you have to define A integer as DIM A AS INTEGER. With A% it doesn't work.