| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Pascal strings |
So to david nugent do I speak these words: Saturday October 02 1993 23:37, david nugent wrote to Steven Pasztor: >> Is there any way to get C to work with Pascal style strings? dn> You probably mean 'Turbo Pascal' style strings. :-) And yes, there is a dn> difference. TP is quite a different language from ANSI/ISO Pascal. Yep, TP it is... dn> But yes - easily. Just create the functions to do so. str*() functions dn> are just library functions - the only real "strings" support in C is that dn> you can declare a NUL terminated 'C' string automatically with: dn> char mystring[] = "xyz"; dn> and dn> char * mystring = "xyz"; dn> I've had to interface with TP code on many occasions and there's not much dn> to it. Just handle the pascal strings as arrays of unsigned chars with a dn> byte up front. Once you get sick of the 255 character limit, you'll dn> probably not worry about using them unless interfacing to structures dn> designed for TP. Or, you'll upgrade to C++ and write a string class which dn> handles all the fiddling required for more useful schemes transparently. Actually, it's C++ I'm using... I keep forgetting the minor (no comment on that please! :-) ) differences from one version to the next. It's just that most of my interesting ASM routines are designed for interfacing with TP. And it seems much simpler then the C equivelents... Expecialy at times when you don't need the extra length! nevets --- FMail 0.94* Origin: HELP!!! (3:632/103.123) SEEN-BY: 50/99 54/54 99 620/243 622/405 623/630 632/103 301 348 365 386 998 SEEN-BY: 633/371 634/383 384 635/502 503 544 555 570 636/100 670/206 711/401 SEEN-BY: 711/409 430 807 808 809 932 934 712/623 627 713/888 714/906 800/1 @PATH: 632/103 348 635/503 50/99 54/54 99 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.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™.