プレイ日記
Scientist Speedy1101
How do you print only part of a string? For instance the input is "echo bananas" and the output is "bananas".
0そうだね
プレイ済み
返信[1]
親投稿
Hanzo rzsense
In this case, MID$ is available. A$="echo bananas" B$=MID$(A$,5,LEN(A$)-5) "bananas" will be substituted for B$.
1そうだね
未プレイ
返信[2]
親投稿
Scientist Speedy1101
So, INPUT "",A$ can be used instead of A$="echo bananas" for user input? Well, thanks for the help! Now I have to get back to my DOS simulator.
1そうだね
プレイ済み
返信[3]
親投稿
Stewart segludian
It sounds like you are trying to parse a command line. Perhaps the attached code's split function will help. You pass in a string, a delimiter, and an array to fill. It chops up the string wherever it finds the delimiter putting the vales in the array. [warning, it emptys the array first].
2そうだね
プレイ済み
返信[4]
親投稿
Scientist Speedy1101
Thanks! I've got it.
0そうだね
プレイ済み