General issue
When reading in a text string, the executable detects each \
and "
and waits for the following character before deciding what to do. The handling is shown in the following table:
From | To |
\\ |
\ |
\" |
" |
"" |
" |
You might be used to Microsoft Visual Basic or Microsoft VBA which (I think) has a richer set of conversions, and (I think) requires that a single \
is always input as \\
This executable will treat the follow string definitions as generating the same result:
dir("z:\some path")
dir("z:\\some path")
Rather than have the richness found in some other languages, this executable lets you insert unusual characters by using the chr ( value ) command
So to insert a tab you could use
dim myString ="Hello" & chr(0x09) & "world"
message = myString
Text string commands
work in progress!
FreeString
An internal variable used to hold a user defined string.
The power of this variable is that it is internally linked to some special handling.
Specifically:
If an input line begins with >
<string expression>
then the resulting action is FreeString = <string expression>
If an input line begins with >>
<string expression>
then the resulting action is FreeString = freestring & <string expression>
——————————————
InStr
Checks to see if a string contains a specific sub-string. Optionally you can control whether the check is case sensitive or not. Default is case insensitive.
function InStr ( <“Look in” string expression> , <“Look for” string expression> , OPTIONAL <Case flag> )
——————————————
SubStr
Returns a substr from a source string.
Is syntactically the same as the SQLite command substr
and performs the same function as this executable’s mid command.
function SubStr ( <Source string expression> , start at offset , OPTIONAL keep character count )
——————————————
InStrRex
Checks to see if a string contains a specific sub-string. Optionally you can control whether the check is case sensitive. Default is case insensitive.
Unlike the command instr the command InstrRex uses a regular expression as its second parameter
Returns 0 if no match, else returns the 1-based index of the start of the match
- The underlying regexp machine is based on the pcre2 “C” source files from https://www.pcre.org/
- Syntax: http://www.pcre.org/current/doc/html/pcre2syntax.html
function InstrRex ( <“Look in” string expression> , <“Regular Expression” string expression> )