Gloria, Jing wrote:
Is there a way such that the variable names (or procedure/function names) in GPC are created so that the name is all lowercase? This would make it match C variable names which are in lowercase. I understand the GPC converts the names to uppercase for the first character and lower case for all the succeeding characters in the name. I am converting an application where some modules are in written in Pascal and others in C. They share many global variables and some procedures and functions. There are too many lines of code and too many files to change if I use asmname. Furthermore, I need to keep the source files such that I can build on either a Sun Sparc system or Intel Solaris 7 system.
BTW, doesn't GPC work on Intel/Solaris yet? I've never tried this since I don't have such a system to test yet (maybe after my next HD upgrade ... ;-), but since it works on both Sparc/Solaris and Intel/{Linux,FreeBSD,DJGPP,Cygwin,Mingw}, any problems occurring on Intel/Solaris shouldn't be too big I suppose.
Since these two systems have different compilers, this GPC naming convention is requiring a lot of work. Bottomline, I want GPC and GCC to generate the same name so that I can link all the modules. Any suggestions or comments?
No, sorry. In fact, the (asm)naming schema will change even more in the future when GPC will support qualified identifiers. Then a variable `foo' in a unit `bar' might be called `bar.foo' or `bar$foo' or something like this on the asm level. (And with function overloading, it might be even worse, though this doesn't apply to variables, of course.) The only way to get a reliable asm name is to use `asmname'.
Frank