[Gambas-user] Set a Variable from file
Eilert
eilert-sprachen at ...221...
Mon Sep 27 15:28:47 CEST 2004
If you use INPUT, the reading will stop at everything like whitespaces
and so on.
Use LINE INPUT instead, that reads everything until the end of the line.
OPEN "/tmp/risultato" FOR READ AS #FileCPU
LINE INPUT #FileCPU, CPU
CLOSE #FileCPU
Rolf
Cryrulez schrieb:
>
> I have a file /tmp/risultato that contain a string: Athlon XP 2000
> I want to set a variable with this string and I use this function
>
> OPEN "/tmp/risultato" FOR READ AS #FileCPU
> INPUT #FileCPU, CPU
> CLOSE #FileCPU
>
> The variable CPU contain only Athlon and not all string.
> Who have an idea to set the complete string to CPU variable? Tnx
>
More information about the User
mailing list