From: David E. <de...@ar...> - 2006-08-29 09:44:48
|
Roger While wrote: > David Essex wrote : > ... >> BTW, doesn't the above methodology lead to illegal program >> name lengths under certain conditions ? > > Haven't come across one yet :-) > Remember COBOL words are restricted to 31 characters > (also in 2002/2008 standards) so should not be a problem. > Even if all 31 characters were mangled, 93 characters for > gcc is no problem :-) Some mainframe COBOL compilers, as an extension, support names as long as 160 characters. >> Anyway, I think the main issue here is program naming conventions >> are platform (OS ?) dependent. >> ... >> Especially when a COBOL 'module' is called from from another >> language. So basically you lose some OS functionality and add >> some more complexity. > > Well that's always going to be the case. If you want to call > COBOL from non-COBOL, then you are always going to have to look > at the particular COBOL implementation as to how to do this. IMHO, that should not be the case. On many platforms you can mix C, C++ and/or Pascal (and many other languages) without too much difficulty, regardless of the compiler. And certainly does not require a special link-loader just to resolve the name. Perhaps a special C macro, much like when a C programs calls C++ functions (#ifdef _cplusplus ...). This could perform some form of 'name (un)mangling', if required. This should work, I think. > ... > The 2002 standard has : > PROGRAM-ID. program-name [AS literal] ...... What is the point of having two program-names ? Anyway, water under the bridge, unless some else would like to create a new TC release. |