08-25-2022, 03:55 AM
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.
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.