aboutsummaryrefslogtreecommitdiff
path: root/pseudocode-lib/string.cps
diff options
context:
space:
mode:
Diffstat (limited to 'pseudocode-lib/string.cps')
-rw-r--r--pseudocode-lib/string.cps6
1 files changed, 5 insertions, 1 deletions
diff --git a/pseudocode-lib/string.cps b/pseudocode-lib/string.cps
index 1ad63d3..cb06758 100644
--- a/pseudocode-lib/string.cps
+++ b/pseudocode-lib/string.cps
@@ -78,9 +78,13 @@ OVERLOAD FUNCTION NUM_TO_STR(Number : REAL) RETURNS STRING
CALL _string_impl_from_real(Result._HANDLE, (C_DOUBLE)Number)
RETURN Result
ENDFUNCTION
-FUNCTION STR_TO_NUM(S : STRING) RETURNS REAL
+OVERLOAD FUNCTION STR_TO_NUM(S : STRING) RETURNS REAL
RETURN (REAL)_string_impl_to_real(S._HANDLE)
ENDFUNCTION
+OVERLOAD FUNCTION STR_TO_NUM(C : CHAR) RETURNS REAL
+ DECLARE S : STRING(1, (C_CHAR)C)
+ RETURN STR_TO_NUM(S)
+ENDFUNCTION
FUNCTION LENGTH(S : STRING) RETURNS INTEGER
RETURN (INTEGER)_string_impl_length(S._HANDLE)
ENDFUNCTION