source: to-imperative/trunk/samples/Convert/to_int2.rf @ 751

Last change on this file since 751 was 751, checked in by orlov, 18 years ago
  • Example demonstrating where spaces are allowed in the To-Int argument.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 515 bytes
Line 
1$use Convert StdIO;
2
3Main =
4  {
5    <PrintLN <To-Int " 5">>;
6    <PrintLN "Spaces aren't allowed in the begining of a word!">;
7  },
8  {
9    <PrintLN <To-Int "5 7">>;
10    <PrintLN "Spaces aren't allowed in the middle of a word!">;
11  },
12  {
13    <PrintLN <To-Int "7 ">>;
14    <PrintLN "Spaces aren't allowed in the end of a word!">;
15  },
16  {
17    <PrintLN <To-Int 5 ' 7'>>;
18    <PrintLN 'So, spaces can go before or after all digits,\n'
19      'but aren\'t allowed in the middle of integer print representation.'>;
20  };
21
Note: See TracBrowser for help on using the repository browser.