<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Ascii converting help please</title>
    <link>http://www.mapleprimes.com/questions/37562-Ascii-Converting-Help-Please</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 12:32:43 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 12:32:43 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Ascii converting help please</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Ascii converting help please</title>
      <link>http://www.mapleprimes.com/questions/37562-Ascii-Converting-Help-Please</link>
    </image>
    <item>
      <title>readbytes</title>
      <link>http://www.mapleprimes.com/questions/37562-Ascii-Converting-Help-Please?ref=Feed:MaplePrimes:Ascii converting help please:Comments#answer66679</link>
      <itunes:summary>&lt;pre&gt;writebytes("testing.txt","testing");

                                  7

close("testing.txt");
readbytes("testing.txt",infinity);

                 [116, 101, 115, 116, 105, 110, 103]

convert(%,bytes);

                              "testing"
&lt;/pre&gt;
&lt;p&gt;Alec&lt;/p&gt;</itunes:summary>
      <description>&lt;pre&gt;writebytes("testing.txt","testing");

                                  7

close("testing.txt");
readbytes("testing.txt",infinity);

                 [116, 101, 115, 116, 105, 110, 103]

convert(%,bytes);

                              "testing"
&lt;/pre&gt;
&lt;p&gt;Alec&lt;/p&gt;</description>
      <guid>66679</guid>
      <pubDate>Sun, 05 Apr 2009 05:56:40 Z</pubDate>
      <itunes:author>alec</itunes:author>
      <author>alec</author>
    </item>
    <item>
      <title>question( In need of help badly)</title>
      <link>http://www.mapleprimes.com/questions/37562-Ascii-Converting-Help-Please?ref=Feed:MaplePrimes:Ascii converting help please:Comments#answer66681</link>
      <itunes:summary>&lt;p&gt;These are the&amp;nbsp; question i was asked&lt;/p&gt;
&lt;p&gt;Q.1. Write a procedalure that takes a list of characters as input and returns a corresponding list of ASCII values as output&lt;/p&gt;
&lt;p&gt;Q.2.i)Write a prcedure that takes as its 3 inputs 2 positive integers a and b and a list of numbers. Each element of the returned list should consist of the corresponding element of the input list, raised to the power of b and taken modulo a.&lt;/p&gt;
&lt;p&gt;Q2. ii) Check that if your procedure is used to encrypt a list of numbers with parameters a=33 and b= 3 and then encrypt the result with parameters a=33 and b=3, the final list matches the original list.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;These are the&amp;nbsp; question i was asked&lt;/p&gt;
&lt;p&gt;Q.1. Write a procedalure that takes a list of characters as input and returns a corresponding list of ASCII values as output&lt;/p&gt;
&lt;p&gt;Q.2.i)Write a prcedure that takes as its 3 inputs 2 positive integers a and b and a list of numbers. Each element of the returned list should consist of the corresponding element of the input list, raised to the power of b and taken modulo a.&lt;/p&gt;
&lt;p&gt;Q2. ii) Check that if your procedure is used to encrypt a list of numbers with parameters a=33 and b= 3 and then encrypt the result with parameters a=33 and b=3, the final list matches the original list.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</description>
      <guid>66681</guid>
      <pubDate>Sun, 05 Apr 2009 20:09:48 Z</pubDate>
      <itunes:author>Jabz</itunes:author>
      <author>Jabz</author>
    </item>
    <item>
      <title>re</title>
      <link>http://www.mapleprimes.com/questions/37562-Ascii-Converting-Help-Please?ref=Feed:MaplePrimes:Ascii converting help please:Comments#comment66680</link>
      <itunes:summary>&lt;p&gt;thank u for the post. I was really wondering how to convert the contents of a txt file without entering the content again.&lt;/p&gt;
&lt;p&gt;For example&lt;/p&gt;
&lt;p&gt;if i open a a file &lt;/p&gt;
&lt;p&gt;filename := &amp;quot;C:\\Users\\x\\Desktop\\testing.txt&amp;quot;:&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Text[WriteLine]( filename, &amp;quot;FileTools example&amp;quot; );&lt;/p&gt;
&lt;p&gt;what is the code that i have to type for maple to open the file read the data and convert into ascii and display it?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thank u&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;thank u for the post. I was really wondering how to convert the contents of a txt file without entering the content again.&lt;/p&gt;
&lt;p&gt;For example&lt;/p&gt;
&lt;p&gt;if i open a a file &lt;/p&gt;
&lt;p&gt;filename := &amp;quot;C:\\Users\\x\\Desktop\\testing.txt&amp;quot;:&lt;br /&gt;
&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Text[WriteLine]( filename, &amp;quot;FileTools example&amp;quot; );&lt;/p&gt;
&lt;p&gt;what is the code that i have to type for maple to open the file read the data and convert into ascii and display it?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thank u&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>66680</guid>
      <pubDate>Sun, 05 Apr 2009 18:57:13 Z</pubDate>
      <itunes:author>Jabz</itunes:author>
      <author>Jabz</author>
    </item>
    <item>
      <title>readbytes</title>
      <link>http://www.mapleprimes.com/questions/37562-Ascii-Converting-Help-Please?ref=Feed:MaplePrimes:Ascii converting help please:Comments#comment66682</link>
      <itunes:summary>&lt;pre&gt;close(filename);
readbytes(filename,18);

  [70, 105, 108, 101, 84, 111, 111, 108, 115, 32, 101, 120, 97, 109,

        112, 108, 101, 13]
&lt;/pre&gt;
&lt;p&gt;Alec&lt;/p&gt;</itunes:summary>
      <description>&lt;pre&gt;close(filename);
readbytes(filename,18);

  [70, 105, 108, 101, 84, 111, 111, 108, 115, 32, 101, 120, 97, 109,

        112, 108, 101, 13]
&lt;/pre&gt;
&lt;p&gt;Alec&lt;/p&gt;</description>
      <guid>66682</guid>
      <pubDate>Mon, 06 Apr 2009 01:42:46 Z</pubDate>
      <itunes:author>alec</itunes:author>
      <author>alec</author>
    </item>
    <item>
      <title>Answers</title>
      <link>http://www.mapleprimes.com/questions/37562-Ascii-Converting-Help-Please?ref=Feed:MaplePrimes:Ascii converting help please:Comments#comment66683</link>
      <itunes:summary>&lt;p&gt;Q.1. It is easier to convert a string,&lt;/p&gt;
&lt;pre&gt;
convert(&amp;quot;abc&amp;quot;,bytes);

                             [97, 98, 99]
&lt;/pre&gt;
&lt;p&gt;A list of characters can be converted using the following procedure,&lt;/p&gt;
&lt;pre&gt;
f:=L-&amp;gt;map(op@convert,L,bytes):
&lt;/pre&gt;
&lt;p&gt;Another solution:&lt;/p&gt;
&lt;pre&gt;f:=curry(map,StringTools:-Ord);
&lt;/pre&gt;
&lt;p&gt;For example,&lt;/p&gt;
&lt;pre&gt;
L:=[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]:
f(L);

                             [97, 98, 99]
&lt;/pre&gt;
&lt;p&gt;Q.2.i)&lt;/p&gt;
&lt;pre&gt;
F:=(a,b,L)-&amp;gt;map(x-&amp;gt;x&amp;amp;^b mod a,L):
&lt;/pre&gt;
&lt;p&gt;Q2. ii)&lt;/p&gt;
&lt;pre&gt;
L:=[$0..32];

  L := [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,

        18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]

L1:=F(33,3,L);

  L1 := [0, 1, 8, 27, 31, 26, 18, 13, 17, 3, 10, 11, 12, 19, 5, 9, 4,

        29, 24, 28, 14, 21, 22, 23, 30, 16, 20, 15, 7, 2, 6, 25, 32]

F(33,3,L1);

  [0, 1, 17, 15, 25, 20, 24, 19, 29, 27, 10, 11, 12, 28, 26, 3, 31, 2,

        30, 7, 5, 21, 22, 23, 6, 4, 14, 9, 13, 8, 18, 16, 32]
&lt;/pre&gt;
&lt;p&gt;Nope. On the other hand,&lt;/p&gt;
&lt;pre&gt;
F(33,7,L1);

  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,

        19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
&lt;/pre&gt;
&lt;p&gt;That matches the original list.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Q.1. It is easier to convert a string,&lt;/p&gt;
&lt;pre&gt;
convert(&amp;quot;abc&amp;quot;,bytes);

                             [97, 98, 99]
&lt;/pre&gt;
&lt;p&gt;A list of characters can be converted using the following procedure,&lt;/p&gt;
&lt;pre&gt;
f:=L-&amp;gt;map(op@convert,L,bytes):
&lt;/pre&gt;
&lt;p&gt;Another solution:&lt;/p&gt;
&lt;pre&gt;f:=curry(map,StringTools:-Ord);
&lt;/pre&gt;
&lt;p&gt;For example,&lt;/p&gt;
&lt;pre&gt;
L:=[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]:
f(L);

                             [97, 98, 99]
&lt;/pre&gt;
&lt;p&gt;Q.2.i)&lt;/p&gt;
&lt;pre&gt;
F:=(a,b,L)-&amp;gt;map(x-&amp;gt;x&amp;amp;^b mod a,L):
&lt;/pre&gt;
&lt;p&gt;Q2. ii)&lt;/p&gt;
&lt;pre&gt;
L:=[$0..32];

  L := [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,

        18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]

L1:=F(33,3,L);

  L1 := [0, 1, 8, 27, 31, 26, 18, 13, 17, 3, 10, 11, 12, 19, 5, 9, 4,

        29, 24, 28, 14, 21, 22, 23, 30, 16, 20, 15, 7, 2, 6, 25, 32]

F(33,3,L1);

  [0, 1, 17, 15, 25, 20, 24, 19, 29, 27, 10, 11, 12, 28, 26, 3, 31, 2,

        30, 7, 5, 21, 22, 23, 6, 4, 14, 9, 13, 8, 18, 16, 32]
&lt;/pre&gt;
&lt;p&gt;Nope. On the other hand,&lt;/p&gt;
&lt;pre&gt;
F(33,7,L1);

  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,

        19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
&lt;/pre&gt;
&lt;p&gt;That matches the original list.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;</description>
      <guid>66683</guid>
      <pubDate>Mon, 06 Apr 2009 04:29:38 Z</pubDate>
      <itunes:author>alec</itunes:author>
      <author>alec</author>
    </item>
    <item>
      <title>Yes it Works</title>
      <link>http://www.mapleprimes.com/questions/37562-Ascii-Converting-Help-Please?ref=Feed:MaplePrimes:Ascii converting help please:Comments#comment66684</link>
      <itunes:summary>&lt;p&gt;Thank you so much now i can see clearly what's happenning.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;much much appriciated&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Thank you so much now i can see clearly what's happenning.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;much much appriciated&lt;/p&gt;</description>
      <guid>66684</guid>
      <pubDate>Mon, 06 Apr 2009 08:10:13 Z</pubDate>
      <itunes:author>Jabz</itunes:author>
      <author>Jabz</author>
    </item>
  </channel>
</rss>