Author Topic: BCX Help Version 7.5.3, August 18, 2020  (Read 275 times)

Robert

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
BCX Help Version 7.5.3, August 18, 2020
« on: August 19, 2020, 06:14:58 PM »
BCX Help Version 7.5.3, August 18, 2020

is available as BCXHelp Version 7.5.3 20200818.zip
in the Announcements section of the BCX forum at

https://bcxbasiccoders.com/smf/index.php

Changes include
 
Kevin Diggins
... corrected "ATAN" to "ATN" in Example 1 on the BCX Scripting Procedures page.

... added DATACOUNT function example.

... added remarks to ISTRUE(),ISFALSE(), ISZERO() and NOTZERO() macros

Robert Wishlaw
... replaced all instances of ATAN with ATN.

... in the Modulus Operator section, added a manicule at the beginning of the statement, "When using the modulus operator (%), a space must be to the left and right of of the % symbol."

... removed the BCX RunTime Library section.

... added DISKFREE, DISKSIZE and DISKUSED functions to the GETDRIVE function page.

... added DATACOUNT function to the DATA statement page.

... consolidated CBOOL function with the BOOL$ function page.

... added ISTRUE, ISFALSE, ISZERO, and NOTZERO functions to the BOOL$ function page.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 641
    • View Profile
Re: BCX Help Version 7.5.3, August 18, 2020
« Reply #1 on: August 19, 2020, 08:01:47 PM »
Thank you Robert. 

I"m starting to think we've built something pretty useful.   8)

Jeff

  • Administrator
  • Newbie
  • *****
  • Posts: 30
    • View Profile
Re: BCX Help Version 7.5.3, August 18, 2020
« Reply #2 on: August 19, 2020, 09:41:37 PM »
I"m starting to think we've built something pretty useful.   8)

My friends, it's so far beyond "pretty useful"!  I truly can't express how happy I am to see BCX continue to grow and improve.

Jeff

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 641
    • View Profile
Re: BCX Help Version 7.5.3, August 18, 2020
« Reply #3 on: August 19, 2020, 10:48:24 PM »
Robert ... for your consideration.

I read your caveats in BCX Help regarding the use of ISTRUE and ISFALSE with strings. 
Obviously, the only purpose for doing so would be to test whether a string contains content or not.

The following example explains that it is indeed possible to reliably use these macros for that purpose.

Code: [Select]
'  You can test whether a string is empty or not very quickly using these macros.
'  And this works for static and dynamic strings.
'  The string variable name MUST be preceded with the POINTER operator (*)
'  as shown in the example below.


DIM Str1$                  ' a dynamically allocated string
DIM Str2$ [20] AS CHAR     ' a statically  allocated string


Str1$ = "A dynamic string"
PRINT "ISTRUE  ", ISTRUE(*Str1$)

Str1$ = ""
PRINT "ISTRUE  ", ISTRUE(*Str1$)


Str2$ = "A static string"
PRINT "ISFALSE  ", ISFALSE(*Str2$)

Str2$ = ""
PRINT "ISFALSE  ", ISFALSE(*Str2$)


Robert

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Re: BCX Help Version 7.5.3, August 18, 2020
« Reply #4 on: August 19, 2020, 11:05:15 PM »
Robert ... for your consideration.

I read your caveats in BCX Help regarding the use of ISTRUE and ISFALSE with strings. 
Obviously, the only purpose for doing so would be to test whether a string contains content or not.

The following example explains that it is indeed possible to reliably use these macros for that purpose.

Code: [Select]
'  You can test whether a string is empty or not very quickly using these macros.
'  And this works for static and dynamic strings.
'  The string variable name MUST be preceded with the POINTER operator (*)
'  as shown in the example below.


DIM Str1$                  ' a dynamically allocated string
DIM Str2$ [20] AS CHAR     ' a statically  allocated string


Str1$ = "A dynamic string"
PRINT "ISTRUE  ", ISTRUE(*Str1$)

Str1$ = ""
PRINT "ISTRUE  ", ISTRUE(*Str1$)


Str2$ = "A static string"
PRINT "ISFALSE  ", ISFALSE(*Str2$)

Str2$ = ""
PRINT "ISFALSE  ", ISFALSE(*Str2$)


Hi MrBCX:

A very useful example. Thank you.

The ISTRUE etc. section will be amended using this example.

Robert

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Re: BCX Help Version 7.5.3, August 18, 2020
« Reply #5 on: August 20, 2020, 09:15:04 PM »
Robert ... for your consideration.

I read your caveats in BCX Help regarding the use of ISTRUE and ISFALSE with strings. 
Obviously, the only purpose for doing so would be to test whether a string contains content or not.

The following example explains that it is indeed possible to reliably use these macros for that purpose.

Code: [Select]
'  You can test whether a string is empty or not very quickly using these macros.
'  And this works for static and dynamic strings.
'  The string variable name MUST be preceded with the POINTER operator (*)
'  as shown in the example below.


DIM Str1$                  ' a dynamically allocated string
DIM Str2$ [20] AS CHAR     ' a statically  allocated string


Str1$ = "A dynamic string"
PRINT "ISTRUE  ", ISTRUE(*Str1$)

Str1$ = ""
PRINT "ISTRUE  ", ISTRUE(*Str1$)


Str2$ = "A static string"
PRINT "ISFALSE  ", ISFALSE(*Str2$)

Str2$ = ""
PRINT "ISFALSE  ", ISFALSE(*Str2$)


Hi MrBCX:

A very useful example. Thank you.

The ISTRUE etc. section will be amended using this example.

Hi MrBCX:

Your recent "GOES TO operator" post reminded me that when I amended the ISTRUE/ISFALSE examples, instead of using

"POINTER operator (*)"

I used

"Value at Address operator (*)"

Considering that the * is the complement of the "Address of Operator &", it seemed most appropriate, and to my mind, the best functional description.

Other choices for "POINTER operator (*)" were "Indirection Operator (*)" and "Dereference Operator" neither of which, in my opinion, add any descriptive value.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 641
    • View Profile
Re: BCX Help Version 7.5.3, August 18, 2020
« Reply #6 on: August 20, 2020, 10:10:26 PM »
"Value at Address operator (*)"

+1