TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: Jim Peasley 72726,1153 (X)
from: Bruce MacKenzie 71725,376
date: 1990-12-08 12:40:47
subject: #8639-#`C` problem

#: 8640 S3/Languages
    08-Dec-90  12:40:47
Sb: #8639-#'C' problem
Fm: Bruce MacKenzie 71725,376
To: Jim Peasley 72726,1153 (X)

Jim,
     Strcat[date,'/0']; is not the way to null terminate a string.  Strcat
assumes the string pointed to by date is already null terminated.  It searches
along it until it finds a null (from the output it obviously doesn't find a
null until it's searched along several characters beyond the space set aside
for the string).  It then tacks on the second string, a null string in this
case, at that position.  To null terminate date all you need do is explicitly
assign the null: date[5]=0;

There are 2 Replies.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.