[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

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

2495.0. "Benchmark Modula-2 Question" by ADO75A::MCGHIE () Sat Apr 22 1989 07:43

    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.RTitleUserPersonal
Name
DateLines
2495.1Here's a guess26880::treeseWin Treese, Cambridge Research LabMon Apr 24 1989 00:246
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.2ADO75A::MCGHIETue Apr 25 1989 11:3514
    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