Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Defsng etc versus _Define
#5
The difference here is inclusion/exclusion of any of the new data types.

Quickly answer these few questions:

1) What's the command to change the default type to LONG?
2) What's the command to change the default type to SINGLE?
3) What's the command to change the default type to _UNSIGNED LONG?
4) What's the command to change the default type to _BYTE? or _INTEGER64?

The first two, you can do with DEFstatements (DEFLNG and DEFSNG), but with _DEFINE you can do all four commands.

Personally, I find _DEFINE to just be a little more grammatical and easier to read. _DEFINE A-Z AS LONG is a little more typing than DEFLNG A-Z, but it's also fairly well self-documenting. Let someone who has never seen the language before pick up your program and look t as a sort of pseudocode template, and ask them if they understand what each of those two lines is doing. Abbreviations only make sense to the people who understand those abbreviations. (Good example is the LOL -- laugh out loud. For the longest time, my wife would always go "AWWWWWW You're so sweet..." everytime I sent her a message with LOL attached. I found out later she thought I was calling her my Love Of Life.)

But functionally speaking, there's no more difference in DEFLNG and _DEFINE AS LONG than there is in calling a& or DIM a AS LONG. Programming has several ways to end up doing the same thing. It's generally up to the programmer to decide which method they prefer for themselves. Wink
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: 1 Guest(s)