| |
|
|
rafl | Hi,
I have a Textdatei, in the stand per row two Integerwerte and three Floatwerte through space separated.
Bsp.: 1234 345 123.456 567.234 789.456
can I The values by a input # -commands reading (How in middle-aged BASIC-Dialekten) Bsp. input #1, a%,b%,c!,d!,e! or must I The row as String reading and subsequently with val(mid$...) or. val(substr$(...) ) again zerpflücken?
Rafl |
|
|
| |
|
|
|
Jörg Sellmeyer | Hm - something like can still by a short Selbstversuch integrally quick find out, or?
You can The row through Explode then quick into Stringarray get and have so good grabbed hereon. If you single variables benötigst, becomes you but nothing other remain, as whom String To decompose, or The values from the aray To fetch and the variables zuzuweisen. |
|
|
| |
|
|
|
rafl | I have indeed already experimented, having but the hope, something overlooking to have and that it still a einfachere Solution gives, without whom detour a String and anschließender Typumwandlung. |
|
|
| |
|
|
|
Jörg Sellmeyer | Sooo demented umwegig is the then but neither:
Declare a$[]
Declare a%,b%,c!,d!,e!
Var s$ = "1234 345 123.456 567.234 789.456"
'here would then about:
'Input #1, s$
a$[] = Explode(s$," ")
a% = a$[0]
' if You on number sure weg want, take You here each Val() moreover
b% =Val( a$[1])
c! = a$[2]
d! = a$[3]
e! = a$[4]
Print a%,b%,c!,d!,e!
Print
WhileLoop 0,SizeOf(a$[]) - 1
print a$[&Loop]
Wend
WaitInput
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 05/02/16 ▲ |
|
|
|
|
rafl | OK. thanks for speedy Help. |
|
|
| |
|
|