I think it is better when the Length-Parameter is optionaly.
In all the other Basics like BB and so on it is standard.
suggestion: Mid() with optional Length-Param
Re: suggestion: Mid() with optional Length-Param
Agreed.AL90 wrote:I think it is better when the Length-Parameter is optionaly.
In all the other Basics like BB and so on it is standard.
Re: suggestion: Mid() with optional Length-Param
Also agreed, and it's been requested MANY times with no result so far. 

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Your wish is my command ..
Actually, I too would love a Mid with an optional third parameter. So I 4th the request.
Code: Select all
Macro MidStr(str, start, chars = 0)
Mid(str, start, Len(str) * (Not chars) + chars )
EndMacro
Debug MidStr("ABCDEFG",2,2)
Debug MidStr("ABCDEFG",2)

Actually, I too would love a Mid with an optional third parameter. So I 4th the request.
@}--`--,-- A rose by any other name ..