Hi, I am having some trouble with the writeln command.
I copy and paste some text from an application and write such text to a file. Everything works fine except when the text contains a comma.
For example, I get from the clipboard the text THIS IS MY TEXT then I write it to a file and works fine, but if I get THIS IS MY TEXT, HOPE IT WORKS FINE and I write it to the txt, when I open the file there is only HOPE IT WORKS FINE . All the text before the comma has gone. What's the problem? Am I doing anything wrong?
The text can have any other character but not a comma. I put the text into a variable prior to write it to the file, and if I show a message with the content of this variable the whole text appears. Trying to find a solution I tried things like this:
Let>pp=THIS IS MY TEXT, HOPE IT WORKS FINE
Writeln>file.txt,pp
Let>pp="THIS IS MY TEXT, HOPE IT WORKS FINE"
Writeln>file.txt,pp
Let>pp=THIS IS MY TEXT, HOPE IT WORKS FINE
Writeln>file.txt,%pp%
But I always get the same: HOPE IT WORKS FINE But doesn't work!!!!!
Please help me to resolve the problem.
I am sorry about my english, but I am from Spain.
Thanks.
Problem with Writeln
Moderators: JRL, Dorian (MJT support)
Your syntax is wrong. WriteLn takes *three* parameters:
WriteLn>filename,result,line
So you should have:
Let>pp=THIS IS MY TEXT, HOPE IT WORKS FINE
Writeln>file.txt,RESULT,pp
RESULT contains the result of the WriteLn operation.
WriteLn>filename,result,line
So you should have:
Let>pp=THIS IS MY TEXT, HOPE IT WORKS FINE
Writeln>file.txt,RESULT,pp
RESULT contains the result of the WriteLn operation.
MJT Net Support
[email protected]
[email protected]