TIP: Click on subject to list as thread! ANSI
echo: delphi
to: BRYAN SMITH
from: GARY WEINFURTHER
date: 1997-04-11 09:53:00
subject: Building Strings ???

Bryan Smith mentioned this to All:
 BS> var
 BS>   tch : char ;  s : strings ;
 BS> begin
 BS>   tch := 'A' ;
 BS> { then use either }
 BS>   s := tch ;
 BS>   ShowMessage('Drive '+ s + ':') ;   { works OK, no problem }
 BS> { or ... }
 BS>   ShowMessage('Drive '+ tch + ':') ; { problems ! }
 BS> The second causes a GPF somewhat later in the code while traversing a
 BS> pointer structure.  It seems that you can not "plus" a character into a
 BS> string for ShowMessage, though I have "plussed" character variables into
 BS> strings millions of times in the past.
It looks okay to me.  Two things in your message make me suspect that the 
problem is somewhere else.  The first: you stated that the code you posted is 
"simplified".  The second: traversing pointer structires.  There could be 
several things in there somewhere that could cause a GPF.  Your use of a 
character instead of a string could simply be hiding or revealing a later 
problem -- pointer problems are hard to find in that respect.
                                ...Gary
--- GoldED 2.41
---------------
* Origin: Nobody expects the Flying Circus BBS! (1:2410/905)

SOURCE: echomail via exec-pc

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™.