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

Rockbox mail archive

Subject: Re: Problems with rpncalc-2.c
From: BlueChip (
Date: 2004-07-12

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



Page was last modified "Jan 10 2012" The Rockbox Crew