05-03-2024, 10:35 AM
(This post was last modified: 05-03-2024, 12:06 PM by Kernelpanic.)
(05-03-2024, 09:54 AM)bartok Wrote:There is no difference in the matter. A declaration like *)"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.
*)Only A%, not Dim A%
For example:
Code: (Select All)
'Without -Option _Explicit-, 3. Mai 2024
Dim As Integer eingabe, summme
eingabe = 4
summe = eingabe * 3
Print summe
Print
'Spelling mistake
summe = engabe * 4
Print summe
End