Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!jarthur!jshortle From: jshortle@jarthur.Claremont.EDU (John Shortle) Newsgroups: comp.sys.amiga Subject: C/AmigaDos Problem Message-ID: <905@jarthur.Claremont.EDU> Date: 20 Apr 89 15:34:25 GMT Reply-To: jshortle@jarthur.UUCP (John Shortle) Organization: Harvey Mudd College, Claremont, CA Lines: 40 I have written a simple command-line reverse polish notation calculator in C. If you want to compute (3 - 4 / 7), for example, you type, 'num 3 4 7 / -'. It works fine unless you end the command with a plus (+) character. You must hit return twice, and the program doesn't recognize the plus character as part of the statement. I wrote a short program to test this oddity. test.c (compiled with Manx 3.6a): --- #include main (argc, argv) int argc; char *argv[]; { int i; printf("%d\n", argc); for (i = 0; i < argc; i++) printf("%s,", argv[i]); printf("\n"); } ---- Here are some sample input and output: >test a - 3 test,a,-, >test a + (must hit return twice before anything happens) 2 test,a, >test a +++++ (hit return twice) 3 test,a,++++, (note that one of the plusses is missing) --- Does anyone know what causes this and/or how to fix it? Thanks.