RosettaCodeData/Task/Tokenize-a-string/Vedit-macro-language/tokenize-a-string.vedit

21 lines
364 B
Plaintext

Buf_Switch(Buf_Free)
Ins_Text("Hello,How,Are,You,Today")
// Split the text into text registers 10, 11, ...
BOF
#1 = 9
Repeat(ALL) {
#1++
#2 = Cur_Pos
Search(",", ADVANCE+ERRBREAK)
Reg_Copy_Block(#1, #2, Cur_Pos-1)
}
Reg_Copy_Block(#1, #2, EOB_Pos)
// Display the list
for (#3 = 10; #3 <= #1; #3++) {
Reg_Type(#3) Message(".")
}
Buf_Quit(OK)