Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Defsng etc versus _Define
#3
"_DEFINE" is just less typing. Just saying "_DEFINE A-Z AS LONG" at the top of the program is an assumption, then declare with "DIM" whatever else you need which is string, floating point, UDT or whatever. Of course replace "LONG" with type of your choice.

But remember that if you do "_DEFINE A-Z AS LONG", or something more specific like "_DEFINE I AS LONG", then especially in the last case must make sure all variables starting with "i" are of type LONG. Only using "DIM" or using type sigil with variable name could do anything about it.

There is nothing like "DEFLNG" for 64-bit integers in QB64, must use "_DEFINE" in this case, for example "_DEFINE U AS _UNSIGNED _INTEGER64" to have all variables starting with "u" not need type sigil ~&&.

If it causes too much confusion, then avoid "_DEFINE" or the other older ones. Be glad for "_DEFINE" because other BASIC dialects don't have such a thing.
Reply


Messages In This Thread
Defsng etc versus _Define - by PhilOfPerth - 08-25-2022, 01:21 AM
RE: Defsng etc versus _Define - by James D Jarvis - 08-25-2022, 01:33 AM
RE: Defsng etc versus _Define - by mnrvovrfc - 08-25-2022, 01:37 AM
RE: Defsng etc versus _Define - by PhilOfPerth - 08-25-2022, 02:38 AM
RE: Defsng etc versus _Define - by SMcNeill - 08-25-2022, 03:55 AM
RE: Defsng etc versus _Define - by PhilOfPerth - 08-25-2022, 05:20 AM



Users browsing this thread: 3 Guest(s)