dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Problems with rpncalc-2.c

Re: Problems with rpncalc-2.c

From: BlueChip <>
Date: Mon, 12 Jul 2004 17:29:40 +0100

At 16:47 12/07/04, you wrote:
>Hey everyone,
>I'm having problems with getting my Reverse Polish Notation calculator
>plugin working. It seems that my field variables are not being modified
>at all, and I can't pinpoint where in my code that is happening.
>If anyone could give me a hand, the least I could do is owe you a pint ;)
>My Source can be found on:

I cannot find the variable "field" ...few comments that will make the
compiler happy though:

C89: all variables must be declared IMMEDIATELY after an "{" (open brace)
int b = rb->button_get(true);, quite bluntly, if you do not care for the keypress, then this will do:

static int get_key_press()
should be:
static int get_key_press(void)

Why "7*h"??? Surely that should be "7" taken from
rb->lcd_puts(0,7,"0123456789 +-*/");

double rpnstack[5];
errrr, 0,1,2,3,4,5 ...that's SIX numbers and you've only delared [5] elements
not least of all to mention that you request [i+1] which will eventually
request element [6] !!!

this element does not exist:
[0],[1],[2],[3],[4] ...that's all you've declared

Whether this will fix the "field" problem, I don't know, but it will sure
make a difference


Received on 2004-07-12

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy