Posted: Thu Jul 05, 2018 4:08 pm Post subject: Write or Put ?
Hi,*
I never use AVRdos to write somethng, only to read
ex :
Code:
Chdir"lalong"
Sentence ="lalong.txt"
Ff =Freefile() Open Sentence ForInputAs #ff
Do
Lineinput #ff , Stdir ' read a line and result in stdir string Wait1 LoopUntilEof(ff)<>0 Close #ff
Chdir"\"'change to the root directory
The result was 491625N031317ELONGPONT without any "
so I would like replace the file from my ATMEGA2560
I use :
Code:
Chdir"lalong" Print"kill lalong.txt" Kill"lalong.txt" l
Waitms100
Ff =Freefile() Open"lalong.txt"forOutputAs #ff
Write #ff , Sentence
Close #ff
Waitms100
Ff =Freefile() Open"lalong.txt"ForInputAs #ff
Do
Lineinput #ff , Stdir ' read a line and result in stdir string Wait1 LoopUntilEof(ff)<>0 Close #ff
Chdir"\"'change to the root directory
Print"stdir"; Stdir
the result is
"484754N021849EBAGNEUX"
So my question : It is possible to write a string without " " as VBA for excel does ?
Thanks for your help
Jp _________________ pleasure to learn, to teach, to create
Posted: Fri Jul 06, 2018 10:02 am Post subject: solved
Hi Mark
and thanks for your answers
During the night ....I add some line and now it's solved
Code:
IfLeft(stdir , 1)=Chr(34)Then'suppression du " si stdir vient du clavier Delchar Stdir , 1 End If IfRight(stdir , 1)=Chr(34)Then
Lenst =Len(stdir) Delchar Stdir , Lenst
End If
like that if the file is write with VBA it is good, and if it is write from the AVRDOS it is good also
JP _________________ pleasure to learn, to teach, to create
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum