Left () and Right () with negative numbers
Posted: Fri Feb 22, 2019 10:24 am
I would like to suggest to support negative numbers with Left.
Manual says:
It would be nice to have an option to just specify a negative number which would tell how many characters are removed from the source string.
For example:
would return
(one character from the right removed).
This would probably mean shorter .exe because
is much longer (which at the end produces longer .exe files).
Same could apply for Right.
Maybe some other functions could use the same system.
Just think about it and maybe implement it.
In the mean time maybe documentation could be updated to include the range of the Length. For example:
"Length: value specified must be an integer higher than zero." (of course rephrase this)
Saso
Manual says:
Code: Select all
Result \$ = Left ( String$ , Length )
For example:
Code: Select all
result$=Left ("abcdef", -1)
Code: Select all
abcde
This would probably mean shorter .exe because
Code: Select all
result$=Left ("abcdef", Len ("abcdef") - 1)
Same could apply for Right.
Maybe some other functions could use the same system.
Just think about it and maybe implement it.
In the mean time maybe documentation could be updated to include the range of the Length. For example:
"Length: value specified must be an integer higher than zero." (of course rephrase this)
Saso