what does in a for loop tokens and delims?

February 13, 2020 at 08:44:35
Specs: Windows 10
what tokens and delims mean cmd. i need help for my paint in batch


help bro

::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::Stuff for 100 chars
::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::


See More: what does in a for loop tokens and delims?

Reply ↓  Report •

#1
February 13, 2020 at 14:26:15
"FOR /?" (under "options) does a lot better job of explaining than I could do. It's all just for splitting a string of characters into "words", or fields. "tokens" says which words you want to load into variables. "delims" is the character or characters you want to use to base the splitting on, like spaces between words in a sentence. "tokens=2,4 delims=_" applied to: "test_one two_three_four" will give yield
"one two" as the first variable, and "four" as the second variable. The space is no longer a delimiter because it's not explicitly listed in "delims". Lastly, remember that null words are ignored as tokens. ,,,x tokens 4 would NOT give you x, it's considered
the first token since preceding three are null.

Reply ↓  Report •

#2
February 14, 2020 at 04:51:22
"tokens" is a weird way of describing the parameters, for example: parameter 2 and 4 from Nbrane's example.

"delims" is the delimitor, or in English : the character which you define as the separator for different parameters. Usually that is a whitespace, but you can use anything here. It must however be a character that is NOT USED as part of a value of any parameter


Reply ↓  Report •
Related Solutions


Ask Question