MODULE CountChars2; (* ========================================================================= Example GPCP .NET Console Program Count the number of characters in a string using the standard GPCP LEN function Author : Chris Burrows Created: Jan 2007 (c) 2007-2008 CFB Software http://www.cfbsoftware.com/gpcp ========================================================================= *) IMPORT Out, CPmain; PROCEDURE WriteCount(count: INTEGER; IN msg: ARRAY OF CHAR); BEGIN Out.Int(count, 3); Out.String(msg); Out.Ln() END WriteCount; PROCEDURE CountChars(IN s: ARRAY OF CHAR); VAR count: INTEGER; BEGIN Out.String(s); Out.Ln(); count := LEN(s$); WriteCount(count, ' characters') END CountChars; BEGIN CountChars('The quick brown fox jumped over the lazy dog.'); CountChars('Digit 1 looks like letter l, and digit 0 looks like letter O.') END CountChars2.