Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdcrdcf!hplabs!hp-pcd!uoregon!bill From: bill@uoregon.UUCP (bill) Newsgroups: net.unix-wizards Subject: pointer <==> *pointer ?? Message-ID: <23100001@uoregon.UUCP> Date: Mon, 15-Oct-84 00:10:00 EDT Article-I.D.: uoregon.23100001 Posted: Mon Oct 15 00:10:00 1984 Date-Received: Thu, 11-Oct-84 08:07:22 EDT Organization: Univ of Oregon - Eugene, OR Lines: 49 Nf-ID: #N:uoregon:23100001:000:728 Nf-From: uoregon!bill Oct 8 20:10:00 1984 [this line intentionally left blank] For those who are amused by C quirks: While attempting to fix a program bug, I changed the code from arragement A to arrangement B (below). --- A --- char strings[SIZE1][SIZE2]; teststr(str) char *str; { register char (*b)[SIZE2] = strings; while (b < &strings[SIZE1]) { if (strcmp(str, b) == 0) break; b++; . . . } --- B --- char strings[SIZE1][SIZE2]; teststr(str) char *str; { register char (*b)[SIZE2] = strings; while (b < &strings[SIZE1]) { if (strcmp(str, *b) == 0) break; b++; . . . } The result, of course, is that nothing changes. Randy Goodall, Perfect Software, Inc. (courtesy bill) {tektronix,hpcvra,hp-pcd}!uoregon!bill /* ---------- */