Ascii converting help please

April 04 2009 by Jabz 433
false
Maple

0


Hi i am having difficulty converting a text file consisting of words into ascii code. using maple and vice versa.
I dont know how to.

My notepad text is  "(testing)" and i wanted maple to show me "testing"  in ascii code but i just dnt knw how to get it to do it.

Can someone please help me i would be very gratefull

Thank u

 

restart:
with(FileTools[Text]):
   outputfile:= "C:\\Users\\x\\Desktop\\testing.txt":
     message:= ["t","e","s","t","i","n","g"]:
   for Character in message do
       with(StringTools):
       WriteCharacter(outputfile,Character);
end do:
close(outputfile);


document:= "C:\\Users\\x\\Desktop\\testing.txt":
    z:= ReadCharacter(document):
    ListOfCharacter:=[]:
while z <> NULL do
     with(StringTools):
     ListOfCharacter:=[op(ListOfCharacter),z]:
     z:=ReadCharacter(document):
end do:
ListOfCharacter;
                           ["t","e","s","t","i","n","g"]

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account