cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/03/20:49:18

From: "Emir H." <emh076 AT mail DOT usask DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: GPC string display...
Date: 1 Aug 1997 00:52:50 GMT
Organization: University of Saskatchewan
Lines: 20
Message-ID: <01bc9e15$39db33a0$854c8bc0@Emir.usask.ca>
NNTP-Posting-Host: janus1-5.usask.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

	
This may sound like a small problem but I cannot find a solution yet. 
I'm using a string[50] var to store strings of variable length. When I
write the string to the screen, it comes with additional characters,
actually the piece of the longest string that was previously stored in the
same variable.

Example: 

	mystring := 'The long string';
	writeln (mystring);		will write 'The long string'
	mystring := 'One';
	writeln (mystring);		will write 'One long string'

The length of the string appears to be correct after I check it with
writeln(length(mystring)), but the display is confusing.
How to cut extra characters off ?

Emir.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019