Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!decvax!bellcore!ulysses!ucbvax!info-vax From: tihor@NYU-ACF4.ARPA (Stephen Tihor) Newsgroups: mod.computers.vax Subject: Re: Need Help with VAX/VMS C Message-ID: <8602210503.AA13577@nyu-acf4.arpa> Date: Fri, 21-Feb-86 00:03:17 EST Article-I.D.: nyu-acf4.8602210503.AA13577 Posted: Fri Feb 21 00:03:17 1986 Date-Received: Sun, 23-Feb-86 02:21:08 EST References: <8602200928.AA12076@ucbvax.berkeley.edu> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 32 Approved: info-vax@sri-kl.arpa ... the following occurs: Access violation, reason mask=01, virtual address=7473B3C2, PC=00016831, PSL=03C 00000 Being a Unix* hack, I have no idea what this means. Being a VMS user I know to look up errors in the manual (try doing `man bus error` on most unix systems.) Explains says trying to through a bad location. Ah ha he thinks a parameter error in:# ... lib$set_symbol("COL*OR", "WRITE SYS$OUTPUT \"\27[2J\27[H\"", tab); lib$set_symbol("CL*EAR", "WRITE SYS$OUTPUT \"\27[0;41;33m\27[A\"", tab); => lib$delete_symbol("ONE", tab); lib$delete_symbol("LOGOUT", tab); max=strlen(name)-14; ... Checking the one line subroutine summaries: HELP LIB$ LIB$DELETE_SYMBOL I see that the second parameter is the address of a longword containing the symbol table number. tab might contain that from the code given, but wait: I've run it with 'tab' as an int with value 2, and with 'tab' #define'd as 2, and it makes no difference. When this function is called from a basic program it works fine. Can anyone tell me why this is happening, and how I can correct it? Ah ha, you are passing a (long) the value of tab, the integer 2, which is a bad address as we all know instead of a (* long) such as &tab which is what the routine wants.