Mail Archives: djgpp/1998/12/23/04:08:25.1
<color><param>0100,0100,0100</param>Well I am a little new to DJGPP, but I have been programming in
BC/BC++ for a long time, so please forgive me if I am wrong. Um,
why didn't you declare a function prototype? What is the "int
myf();" for? That in itself is wrong because you are calling the
function with out an argument, right? What I would do is remove
"int myf();" and place a prototype at the top, "<color><param>7F00,0000,0000</param>int myf(int x)". Then
try it and see if it works. Hope this helped and happy coding.
-Paul<color><param>0100,0100,0100</param>
</color>From: David Arnold <<darnold AT northcoast DOT com>
Subject: Evaluating functions in RHIDE with ctrl+F4
Date sent: Sun, 20 Dec 1998 15:07:41 -0800
Organization: College of the Redwoods
To: djgpp AT delorie DOT com
Send reply to: djgpp AT delorie DOT com
<italic><color><param>7F00,0000,0000</param>> Hi,
>
> I am very new to C, djgpp, and RHIDE, but I've read a lot of docs and
> done a lot of experimenting. I've written a project, hello.gpr, that
> contains one file, hello.c, as follows:
>
> #include <<stdio.h>
> main()
> {
> int count;
> int myf();
>
> printf("Hello world!\n");
> for (count=0;count<<11;count++)
> printf("The function value is %d\n",myf(count));
> exit(0);
> }
> int myf(int x)
> {
> return(2*x);
> }
>
> When I put in a breakpoint at line 9, run with ctrl+F9, open the
> evaluate and modify box with ctrl+F4, entering myf(3) in the expression
> edit box causes RHIDE to respond with "not available" when I press the
> Eval button.
>
> Can anyone point out my error and point me in the correct direction?
>
> Thanks. Email appreciated.
>
>
>
> --
> David Arnold
> College of the Redwoods
> Mathematics Department
> 7351 Tompkins Hill Road
> Eureka, CA 95501
> (707) 445-6917
> http://online.redwoods.cc.ca.us/instruct/darnold/index.htm
>
>
>
<nofill>
-Michael
- Raw text -