[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SOCKET_H & IFSIO_H



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

still, this does not fix the problem that close cannot be called without callp (RPG does not have the concept of function overloading due to different parameter list). as i said, I did not want to change the prototypes, but add identical ones under the different names. best of both worlds.

That's not the best of both worlds, because the next person to read the code will still see you calling 'closef()' or 'openf()' or something like that instead of the actual API name.


A better solution is simply to put a "callp" in front of the API name. It's not a big inconvienience!



then IBM should write a better (RPG) compiler



Every language has reserved words. Try to name a variable "for" in C. Or "sizeof". Try to name a variable "dim" or "let" in BASIC. Every language has reserved words.


RPG is nice enough to provide a way around the problem by letting you add a "callp" to the start of the line, something that no other language does (to my knowledge.) Furthermore, none of the API names are a problem when used in an equasion. For example, the following works fine:

x = close(fd);

RPG is smart enough to know that close isn't an op-code in this case because it's after an equal sign. I think they did a great job with the RPG compiler.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------