}
-/* Set quiet mode by "-q as only command line option. "*/
+/* Set quiet mode by "-q" as only command line option. */
int quiet = 0;
#define SHH(message) \
line = (char *)GC_malloc(1025);
while (1) {
- SHH("\njoy? ")
+ SHH("joy? ")
status = gets_s(line, 1025);
if (NULL == status) {
/*
TODO: "use feof(3) and ferror(3)"...
*/
- SHH("bye\n")
+ SHH("\n")
break;
}
s = stack;
(Booleans are not integers in Joy.)
'''
if not isinstance(i, int) or isinstance(i, bool):
- raise NotAnIntError(f'Not an integer: {_s(i)}')
+ raise NotAnIntError('Not an integer.')
return i
Raise NotABoolError if b isn't a Boolean.
'''
if not isinstance(b, bool):
- raise NotABoolError(f'Not a Boolean value: {_s(b)}')
+ raise NotABoolError('Not a Boolean value.')
return b
Raise NotAListError if el isn't a stack/quote/list.
'''
if not isinstance(el, tuple):
- raise NotAListError(f'Not a list: {_s(el)}')
+ raise NotAListError('Not a list.')
return el
## jcode = '3 dup [dup mul] times'
## jcode = '0 [1 2 3] [add] step'
## stack, _ = run(jcode, (), dictionary)
- print(stack_to_string(stack), '•')
+ ##print(stack_to_string(stack))