12-27-2022, 11:15 PM
(This post was last modified: 12-27-2022, 11:19 PM by grymmjack.
Edit Reason: Added wiki source
)
Interesting!
You know, I stumbled on a bunch of C library routines that were from std lib. Maybe these could be helpful too?
Are these usable by QB64 somehow? I found these in the wiki. https://qb64phoenix.com/qb64wiki/index.php/C_Libraries
I am not suggesting your code for isNum should be changed, or abandoned. Just asking. isdigit% would be similar?
You know, I stumbled on a bunch of C library routines that were from std lib. Maybe these could be helpful too?
Code: (Select All)
DECLARE LIBRARY
**'ctime.h**
FUNCTION clock () 'arithmetic type elapsed processor representing time.
FUNCTION difftime# (BYVAL time2 AS _UNSIGNED LONG, BYVAL time1 AS _UNSIGNED LONG)
'seconds between time2 and time1
**'ctype.h**
FUNCTION isalnum% (BYVAL c AS INTEGER) 'is an alphabet letter(isalpha(c) or isdigit(c))
FUNCTION isalpha% (BYVAL c AS INTEGER) 'is letter (isupper(c) or islower(c))
FUNCTION isdigit% (BYVAL c AS INTEGER) 'is a decimal digit
FUNCTION isgraph% (BYVAL c AS INTEGER) 'is a printing character other than space
FUNCTION islower% (BYVAL c AS INTEGER) 'is a lower-case letter
FUNCTION isprint% (BYVAL c AS INTEGER) 'is printing character. ASCII: &H20 (" ") to &H7E (~)
FUNCTION ispunct% (BYVAL c AS INTEGER) 'is printing character other than space, letter, digit
FUNCTION isspace% (BYVAL c AS INTEGER) 'is space, formfeed, newline, return, tab, vertical tab
FUNCTION isupper% (BYVAL c AS INTEGER) 'is upper-case letter
FUNCTION isxdigit% (BYVAL c AS INTEGER)'is a hexdecimal digit character(0 thru 9 or A thru F)
FUNCTION tolower% (BYVAL c AS INTEGER) 'return lower-case equivalent
FUNCTION toupper% (BYVAL c AS INTEGER) 'return upper-case equivalent
Are these usable by QB64 somehow? I found these in the wiki. https://qb64phoenix.com/qb64wiki/index.php/C_Libraries
I am not suggesting your code for isNum should be changed, or abandoned. Just asking. isdigit% would be similar?