Gale Paeper wrote:
However, when I tried the basic concept in a test program, I got a "internal compiler error: Bus error" result.
The test program was:
program FourCharCodeTest (input, output);
const ch1value = ord(substr('bool',1,1));
begin writeln('The value of ''b'' is: ', ch1value:1); end.
The backtrace looks like this:
Date/Time: 2003-06-25 22:22:04 +0200 OS Version: 10.2.4 (Build 6I32) Host: G4.local.
Command: gpc1 PID: 2866
Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000004
Thread 0 Crashed: #0 0x000b3144 in expand_expr_stmt_value (stmt.c:2155) #1 0x0003a384 in init_any (statements.c:913) #2 0x00008580 in make_new_variable (declarations.c:3001) #3 0x000085ec in new_string_by_model (declarations.c:3023) #4 0x000363d8 in build_predef_call (predef.c:2480) #5 0x0002dc90 in main_yyparse (parse.c:2489) #6 0x00096e88 in compile_file (toplev.c:2134) #7 0x0009c03c in do_compile (toplev.c:5370) #8 0x0009c108 in toplev_main (toplev.c:5400) #9 0x000018a8 in _start (crt.c:267) #10 0x00001728 in start
PPC Thread State: srr0: 0x000b3144 srr1: 0x0000f930 vrsave: 0x00000000 xer: 0x20000000 lr: 0x000b2f20 ctr: 0x0009c588 mq: 0x00000000 r0: 0x0003a384 r1: 0xbffff2e0 r2: 0x00000000 r3: 0x00cb4150 r4: 0xffffffff r5: 0x00000001 r6: 0x00000000 r7: 0x00000000 r8: 0x00400000 r9: 0x002db218 r10: 0x00000001 r11: 0x00000000 r12: 0x28442288 r13: 0x28442228 r14: 0x00000000 r15: 0x00000000 r16: 0x00000000 r17: 0x00cb2e28 r18: 0x00cb2df8 r19: 0x00000000 r20: 0x00000000 r21: 0x48400228 r22: 0x0029e150 r23: 0x00cb2de0 r24: 0x00cb2d38 r25: 0x48400228 r26: 0x00000000 r27: 0x00000000 r28: 0x00cb3ee0 r29: 0x00cb4150 r30: 0x00cb5000 r31: 0x000b2f20