| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | borland bug? |
G'Day Paul,
-=> Quoting Paul Edwards to All <=-
#include
typedef struct {
float x;
} MYSTRUCT;
void foo(MYSTRUCT *s)
{
fscanf(stdin, "%f", &s->x);
return;
}
void LinkFloat (void) /* float not linked fix */
{
float a=0, *b=&a; /* cause emulator to be linked */
a=*b; /* suppress warning var not used */
}
int main(void)
{
MYSTRUCT s;
foo(&s);
return(0);
}
This'll fix that.
I've had this problem before, the reason has something to do with the
reference to a variable that's not entirely visible to the compiler.
I have the file explaining this somewhere, i'll see if i can find it,
and post it.
I keep this function in my stdstuff library for exactly this reason.
Don't know how it works, seeing it never gets called , i suppose it
just spells it out to the compiler.
Btw, if you've got the technical files from Borland it's in there
somewhere. If you don't i'll send it off when i manage to call.
L8r Frank (fadam{at}ozemail.com.au).
___ Blue Wave/DOS v2.21
--- Maximus 3.01
* Origin: The Software Parlour (3:635/544)SEEN-BY: 50/99 620/243 623/630 632/349 635/503 544 727 711/401 409 410 413 SEEN-BY: 711/430 808 809 932 934 712/515 713/888 714/906 800/1 @PATH: 635/544 50/99 711/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™.