Revision: 1875
Author: jsuijs
Date: Mon Apr 5 23:39:52 2010
Log: user-definable string termination character
http://code.google.com/p/jallib/source/detail?r=1875
Modified:
/trunk/include/jal/print.jal
=======================================
--- /trunk/include/jal/print.jal Mon Apr 5 13:09:27 2010
+++ /trunk/include/jal/print.jal Mon Apr 5 23:39:52 2010
@@ -26,6 +26,11 @@
-- print_sword_fp_dec uses "fixed point" integer, -127.256 to +127.256
-- Imagine the decimal. Thus 0x110 = 1.5 as 128 = 0.5 and 256 = 1
--
+
+if (defined(print_string_terminator) == false) then
+ const byte print_string_terminator = 0 -- default is 0-terminated
strings
+end if
+
include jascii
@@ -48,7 +53,7 @@
var byte i
for len using i loop
- if (str[i] == 0) then exit loop end if
+ if (str[i] == print_string_terminator) then exit loop end if
device = str[i]
end loop
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.