TIP: Click on subject to list as thread! ANSI
echo: pascal
to: DAVID NOON
from: MARK LEWIS
date: 1998-05-18 22:10:00
subject: Pchar Stuff

hiya david! fancy meeting you in here...
 ml>> i need routines to insert, remove, and replace characters. also
 ml>> need routines to strip leading and trailing characters...
DN>>Well I've got a little unit which might be able to solve your problem.
 DN> [Note, I'm NOT the DN in the quotes!]
right! >
 DN> Some (most?) newer compilers have units supplied with them for
 DN> converting to/from PChar.
yep but i'm not really wanting to convert them... what i'm working with are 
file descriptions in my bbs files areas... they are nul terminated "arrays" 
or C strings...
 DN> The simplest way to deal with PChar strings is to convert them
 DN> to some more sensible format that your compiler understands.
 DN> However, if the length exceeds 255 bytes you might be screwed
 DN> if you are using an older compiler that only understands
 DN> TP-style strings.
some of the descriptions are 300 or 400 bytes in size and there are some that 
come in that are 1k or larger... yeah, i know that the file_id.diz specs have 
limits but evidently others don't know about them and try to put their life 
history in them ;-(
 DN> If your compiler supports the ANSISTRING type, or some moral
 DN> equivalent, that might be the way to progress. Just convert
 DN> them to an ANSISTRING.
BP 7.0... i'm doing "plain old dos stuff"... no windows stuff... maybe later 
i'll install the windows stuff and patches to be able to do 16bit os2 
uff...
 DN> Alas, not all Pascal compilers have this kind of facility.
 DN> This means you might be safest writing yourself a unit that
 DN> offers functions to handle PChar arguments. The obvious
 DN> functions wanted are equivalents of LENGTH(), COPY(), etc.
 DN> What else do you need to do?
i'm looking to be able to strip characters from the beginning and end of the 
pchar strings as well as single character replacement on a 1to1 basis and 
also have need to replace single characters with multiple characters. also 
need to be able to insert characters at specific locations...
the character replacement stuff is for replacing high ascii characters with 
low ascii... also need to convert things like '&' to '&r;' for html 
files... rough part now is that i've just started working again and have 
almost no time to develop... would be very nice to locate something with 
source and build from there. with source sos i can fix any problems i find 
along the way...
)\/(ark
---------------
* Origin: (1:3634/12)

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