A good chunk of my code is currently MacOS X specific (not sure if it would work with GNUStep or not, but I rather doubt it at the moment), so it would be difficult to try using it on another platform.
This all may be the case. Just as well it may be a bug in your code (which, e.g. trashes some data which is only seen later). Hard to tell from outside.
I've considered this possibility, and I have had some issues similar to that while working with this code, but the problem I have mentioned has occurred at several different points in the program, and a bug of that nature would be showing up in other ways by now, I am quite certain. Additionally, the fix that I gave previously would indicate that the value is being correctly returned (since it is correctly assigned to the string variable), and that the procedure is correctly retrieving the value (since when using a variable, the correct data is accessed by the procedure). The problem only seems to be occurring when the name of the function is given directly in the procedure call; this may be occurring for function calls as well; I'm not sure yet. However, so far, this only seems to happen when the function returning the value has no arguments of its own, and using a temporary string to hold the value and handing the string variable to the procedure call instead of the direct result of the function call always seems to correct the problem. Note that in most of these cases, there is nothing between the assignment statement and the procedure (well, okay, there IS a semicolon...), so intervening statements should not be the cause of the problem.
All I can say is that I'm using string parameters and results a lot in my own code, also in combination, and I'm not aware of a specific problem like this ...
I have used GPC for a number of other projects, and have not had the problems before; I have been using it most recently under MacOS X, but have also used it on Solaris and IRIX (possibly Linux at one point; I can't remember really; I know I used FreePascal under DOS and Linux), and this is the first time I am experiencing these problems... of course, this is probably the largest program I have ever written in Pascal, or in any other language, for that matter.
The complete source tree, plus some extra files, is about 616K uncompressed; with the binaries, it bloats to over 3MB. I hesitate to send even just the source code over the list; if you have a private address you want the code on, eMail me offlist, but as I pointed out, this is largely MacOS X only right now.
If it's possible for you, you can sent me the large code, and if I can reproduce the bug under Linux, DJGPP, Solaris or another system I use, I might be able to fix it.
Otherwise, you can wait until GPC gets range-checks (hopefully not too long), which might find the problem if it's an out-of-range access in your code (which is just one possibility, of course).
As mentioned above...
----------------------------------------------------------- Frank D. Engel, Jr. fde101@fjrhome.net
____________________________________________________________ Free 20 MB Bannerless Domain Hosting, 1000 MB Data Transfer 10 Personalized POP and Web E-mail Accounts, and more. Get It Now At www.doteasy.com