C to Pascal translation.

Ken Yap ken at rochester.UUCP
Sun Dec 23 09:54:08 AEST 1984


In article <284 at oakhill.UUCP> davet at oakhill.UUCP (Dave Trissel) writes:
>Modula-2 does.  Note that Modula-2 also handles string ala "C" with a zero
>terminator byte.

Not quite right. Modula-2 treats strings as arbitary length char
arrays.  This is normally implemented by passing two parameters, the
array address and a count.  The callee can find out how long the array
is by using the intrinsic HIGH(a) where a is the array in question.
Some implementations have chosen to add a null byte at the end as well
to allow intermixing of C and Modula-2 routines.

	Regards,
-- 
	Ken Yap

UUCP: (..!{allegra, decvax, seismo}!rochester!ken) ARPA: ken at rochester.arpa
USnail:	Dept. of Comp. Sci., U. of Rochester, NY 14627.



More information about the Comp.lang.c mailing list