Subj : Re: void interrupt(*oldvects[2])(...); can't compile. To : borland.public.cpp.borlandcpp From : Ed Mulroy [TeamB] Date : Wed Dec 08 2004 10:39 am The code you show appears to be from Serial.CPP, part of a Borland tech info document on serial communications for Turbo C++ for DOS from around 1989. > 1. I do not recognize the declaration syntax [what does > the (...) mean? > 2. When trying to compile I get several errors, including: > E2449 Size of 'interrupt' is unknown or zero > E2141 Declaration syntax error at line 29 (the function > itself) In C and C++ an ellipsis (the three periods) indicate a variable argument list. The word 'interrupt' is a keyword specific to the compiler. It tells the compiler that the function is set up a specific way, a way that is compatible with being called in response to a processor interrupt. In later years the language specifications were changed and keywords specific to a given vendor are suppossed to begin with an underscore so later compilers used _interrupt. Later still the language committees required two instead of one leading underscores, making the keyword __interrupt. For backward compatability, unless the ANSI standard option is enabled, all of interrupt, _interrupt and __interrupt should be recognized by the compiler. What compiler are you using? You posted your question both here and in the C++ Builder X group. It is possible that you are trying to write a program for Windows. If so, this is 16 bit DOS code and will not work with Windows. .. Ed > Nathan Witemberg wrote in message > news:41b6a585@newsgroups.borland.com... > > I am having trouble with a serial communication routine (which > I didn't write). Specifically with the interrupt handling routine > which is the following: > > void interrupt com_int(void) > /* Handle communications interrupts and put them in ccbuf */ > { > disable(); > if ((inportb(portbase + IIR) & RX_MASK) == RX_ID) > { > ccbuf[endbuf++] = inportb(portbase + RXR); > endbuf %= SBUFSIZ; > } > /* Signal end of hardware interrupt */ > outportb(ICR, EOI); > enable(); > > } /* com_int */ > > Which is previously declared in an include file as: > void interrupt(*oldvects[2]) (...); > > 1. I do not recognize the declaration syntax [what does > the (...) mean? > 2. When trying to compile I get several errors, including: > E2449 Size of 'interrupt' is unknown or zero > E2141 Declaration syntax error at line 29 (the function > itself) > > I have seen that this is a rather common routine, anybody > with experience in serial cummunication? Any clue as how > to get past the compile errors? .