# modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # # Interactive Test 065 # Tests plat module's putb and getb functions # import sys sys.puts("Type a letter: ") c = sys.getb() sys.puts("Echo: ") sys.putb(c) sys.putb(c + 1) sys.putb(c + 2) sys.putb(ord("\n"))
print "if-then %-22.20f" % (1.0/i); if(i<3): print "if-(then)-else %32.32f" % (1.0*i); else: print "if-then-(else) %-.32f" % (1.0/i); print "=== check: for loop 100 func-call-loop"; for i in range(0,100): j= nulladd(i)+j; j= nulllib(j); print j print "=== check: sys module-*"; print sys.heap(); sys.putb(0x31);sys.putb(0x31);sys.putb(0x39);sys.putb(0x32); ## will display 1192 print "\r\n"; print sys.getb(); ## -1=255 returned print sys.time(); # will return zero... not implemented yet X-D #sys.wait(150); ## waiting 150ms ... looping :-< #print sys.time(); print "=== check: string module-atoi"; print string.atoi("-123"); print string.atoi(" -123",8); print string.atoi("-123",16); ##print string.atoi("-123 "); ## error trailing junk chars. print "=== check: string module-find"; print string.find("-123",'-'); print string.find("-123",'3'); print string.find("-123",'a'); print string.find("-123",'');
# modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # # Interactive Test 065 # Tests plat module's putb and getb functions # import sys sys.puts("Type a letter: ") c = sys.getb() sys.puts("Echo: ") sys.putb(c) sys.putb(c+1) sys.putb(c+2) sys.putb(ord("\n"))