Title: | AMIGA NOTES |
Notice: | Join us in the *NEW* conference - HYDRA::AMIGA_V2 |
Moderator: | HYDRA::MOORE |
Created: | Sat Apr 26 1986 |
Last Modified: | Wed Feb 05 1992 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 5378 |
Total number of notes: | 38326 |
Hi, anyone out there using Benchmark Modula-2 and the optional C library ? I've been trying to compile some of the examples that are supplied with the compiler and some fail. A couple of them were fixed when I made available the optional Simplified library modules. However a number of the demo programs are using a routine STRCPY which I suspect comes from the optional C library (which I didn't buy). I was wondering whether anyone out there could tell me what the routine does. It has two parameters source and destination addresses of strings. I figure one string is modula-2 format the other c format and the copy process "converts" from one to the other. I presume the internal formats used by the two languages could be different. Regards Mike
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2495.1 | Here's a guess | 26880::treese | Win Treese, Cambridge Research Lab | Sun Apr 23 1989 21:24 | 6 |
strcpy() copies a string from the source character array to the destination character array. You should be able to write it easily. Just be careful of the string lengths. - Win | |||||
2495.2 | ADO75A::MCGHIE | Tue Apr 25 1989 08:35 | 14 | ||
Thanks Win, I figured it would be something like that. I modified one of the example programs tonight (seemingly successfully). But I fudged the particular piece of code to use ARRAY OF CHAR parameters rather than addresses which are the actual parameters expected by the real STRCPY routine. I believe with Modula-2 there is a standard end-of-string character you can look for when processing the string. I'll check my Modula-2 docs. thanks again Mike |