Hello everyone,
I tried to get a strsub for the tring below but got the error "Expression continues past expected end". What did I do wrong on the below code?
******************
Line = '"admprdopcd01","2748","VSP","02/05/25","","71","6064"'
1stPortion = StrSub(Line, 1, 22)
******************
Thanks advance!
kle2
You can't begin a variable name with a numeric digit, i.e. 0 through 9. From the documentation:
'All WinBatch variables must start with an alphabetic character. They may contain but not start with numeric digits. If you name a variable something like, "30DaysAgo", you'll get an error message that says "Expression continues past expected end."'
https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/HTMLWIL_V__002.htm (https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/HTMLWIL_V__002.htm)
Quote from: td on February 06, 2025, 07:42:28 AMYou can't begin a variable name with a numeric digit, i.e. 0 through 9. From the documentation:
'All WinBatch variables must start with an alphabetic character. They may contain but not start with numeric digits. If you name a variable something like, "30DaysAgo", you'll get an error message that says "Expression continues past expected end."'
https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/HTMLWIL_V__002.htm (https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/HTMLWIL_V__002.htm)
Awesome! Thanks again for your help, TD!
The assignment to Line is wrong, too. What are those commas there for?
BTW, in future, you really should report which line triggered the error. That information *IS* available in the error box that WB displays.