Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pynxc/tutorial_samples/12_ASCII.py
diff options
context:
space:
mode:
Diffstat (limited to 'pynxc/tutorial_samples/12_ASCII.py')
-rw-r--r--pynxc/tutorial_samples/12_ASCII.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/pynxc/tutorial_samples/12_ASCII.py b/pynxc/tutorial_samples/12_ASCII.py
new file mode 100644
index 0000000..68ae25d
--- /dev/null
+++ b/pynxc/tutorial_samples/12_ASCII.py
@@ -0,0 +1,16 @@
+def main():
+ handle=Byte()
+ i=Integer()
+ slen=Integer()
+ s=String()
+
+ if (CreateFile("ASCII.txt", 2048, handle) == NO_ERR):
+
+ for i in range(256):
+ s=NumToStr(i)
+ slen = StrLen(s)
+ WriteString(handle, s, slen)
+ WriteLn(handle, i)
+
+ CloseFile(handle)
+