| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Auto string-length deter |
On 06 Oct 96, Paul Edwards wrote to Paul Wankadia -- FA> So sizeof() will return the length of the pointer. PW> I seem to get 2... PE> In small memory model you will get that. Try compiling in large, and PE> you'll get 4. What sort of pointers does large model use? Far? Does huge model use huge pointers? PW> BTW how can I make a pointer to point to a set place in memory (i.e. PW> segment and offset) ??? PE> Borland provide a MK_FP macro. Righto FA> Perhaps if the string is global it may also work, but i didn't try or PW> What's wrong with global variables? :) PE> Nothing more than global functions. I was told (prior to this) that global variables should be cut down as much as possible. BTW the way you said "global functions" -- is it possible to declare (this is a silly question) a "local" function, accessible from inside another function ONLY??? FA> alloced block size somewhere, it only seems to work with the Borland RTL. PW> What's RTL? PE> Run Time Library. As I've been told :) Thanks. PW> BTW I'd rather keep the code as portable as possible (between PE> Good to see. You should have a bloody good reason not to make it PE> portable, rather than the other way around. And isolate out the When you say portable, do you mean portable between DOS compilers, or between DOS and Unix, or usable on any platform, or what? I have always been a tad confused about that term. BTW what non-portable functions and stuff exist in Turbo C++ v3.0 that I should be aware of? PE> non-portable bits, either into separate source files, or at least put I try to keep the code together... Yes, I do use PRJs, but it is a little bit of a hassle playing around with the main source and the header already. And yes -- I will not make a good programmer if that's the way I am now :) PE> a #ifdef around it (and make the #ifdef the non-default, and make it PE> still do *something* on an ISO-only environment). BFN. Paul. I have used #ifdef before... BTW you seem rather knowledgeable -- if you haven't already replied about this, what EXACTLY does "extern \"C\"" do and mean??? Chow. Junyer Hakker. --- PPoint 2.00* Origin: Junyer's Workshop (3:640/772.3) SEEN-BY: 50/99 620/243 623/630 640/201 206 216 217 222 230 238 254 297 305 SEEN-BY: 640/309 370 375 386 531 535 547 739 750 772 773 820 821 822 823 890 SEEN-BY: 640/895 690/660 711/409 410 413 430 808 809 932 934 712/515 713/888 SEEN-BY: 714/906 800/1 @PATH: 640/772 531 201 820 711/409 808 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™.