Pelles C forum

C language => Pocket PC and Smartphone questions => Topic started by: Kaljj on August 17, 2009, 02:23:18 pm

Title: Problem with function definitions
Post by: Kaljj on August 17, 2009, 02:23:18 pm
Hello,
I need help.
I write a functions with this definition.

Code: [Select]
double GetDistance (double StartBreite, double StartLaenge)
{
double n,m,d;
...
...
return n;
}

It's work ;D

Now I add a new parameter
Code: [Select]
double GetDistance (double StartBreite, double StartLaenge, double ZielBreite)
{
double n,m,d;
...
...
return n;
}

Don't Work ? :-[

Why and what must I do ?  ???

Thanks Kaljj
Title: Re: Problem with function definitions
Post by: JohnF on August 17, 2009, 02:57:00 pm
Do you get any errors when compiling?

John
Title: Re: Problem with function definitions
Post by: Kaljj on August 17, 2009, 03:20:08 pm
Hello,

a very short anwser:

No


Thanks

Kaljj
Title: Re: Problem with function definitions
Post by: JohnF on August 17, 2009, 03:24:57 pm
Please supply a working (or not working) complete example.

John
Title: Re: Problem with function definitions
Post by: Kaljj on August 17, 2009, 03:47:00 pm
Hi John,

my file's.

the comment Lines are running.

Title: Re: Problem with function definitions
Post by: JohnF on August 17, 2009, 05:09:01 pm
Ok, calling GetDistance (52.517, 13.10, 35.10); gives a result of

8988.959961

What's happening where you are?

John
Title: Re: Problem with function definitions
Post by: Kaljj on August 17, 2009, 08:33:55 pm
Hi John,

a little bit more info.

I use a HTC - Handy with Win Mobile 6.0.
I create with the Pelle C Version 6.0 a pocket pc application wizard a simple "Hello" - Projekt.
I make my changes.

If I run the Programm with two Parameters on the Pocket PC i have a Messagebox.

If I run the Programm with three Parameters on the Pocket PC i have no Messagebox (no reaction).

Thanks
Kaljj
Title: Re: Problem with function definitions
Post by: JohnF on August 17, 2009, 10:02:34 pm
Well I've done all I can, you need someone that can test it and give advice on a pocket pc.

John
Title: Re: Problem with function definitions
Post by: Kaljj on August 18, 2009, 07:46:30 am
Thank You John.

I hope there is everyone who can help me.

Kaljj
Title: Re: Problem with function definitions
Post by: ml on December 20, 2009, 03:39:22 pm
Hello,

I faced the same problem, see forum.pellesc.de/index.php?topic=3000.msg11407#msg11407 (http://forum.pellesc.de/index.php?topic=3000.msg11407#msg11407) :'(
It's a bug inside the ARM code generator of V6.00 when using double variables. Switched back to V5 where it works fine.

ml
Title: Re: Problem with function definitions
Post by: Kaljj on February 12, 2010, 10:55:23 am
Thank you ml,

it's a very good information.

 ;D

Kaljj