Page 1 of 1

**Major Bug in PocketC Architect**

PostPosted: Sun Dec 09, 2007 9:20 am
by Neilf
Hey Percival!! Here's the answer to your question.

Not long ago Percival asked me why I abandoned the compiler, so I'm going to take you through a procedure that should bring up a blank screen in POSE
or your palm device, which ever you chooose. :wink:

-First, just open the "Minimal folder" in the samples Directory
-Then open the "Minimal.ocp" file, but don't set it to the project file just yet.
-Scroll down to the handler at the bottom "myapp.onstart()"
-This single line -> myForm.load();
-Change to -> myForm.load;
-At this point don't compile it, instead, just save the file.
-Now SET the Minimal.ocp file to the project file.
-Next compile it!!, it should, if not go back and try it again.
-If you run the PRC file in POSE or download it to your device, You should see a blank screen :x

It's kind of funny now :) , but it wasn't while I was trying to compose a simple program awhile ago.
I didn't address this issue to Dewey, It really doesn't matter anymore, it's water under the bridge.


Re: **Major Bug in PocketC Architect**

PostPosted: Sun Dec 09, 2007 6:06 pm
by dewey
PocketC Architect allows you to take the address of functions and methods, even ones provided by the runtime like UIForm.load. So, the line: myForm.load; is perfectly valid code - it is an expression that evaluates to a function pointer. In other words, this is not a bug. Given that this does confuse some new users, it would be nice if the compiler could generate a warning for function pointer expressions that are not assigned, passed to functions, or otherwise used properly.

Re: **Major Bug in PocketC Architect**

PostPosted: Tue Dec 11, 2007 4:04 am
by Neilf
Valid Code Huh? :wink: Well not I where I'm from!! Appears that the program has crashed!!

Maybe try and fix it!!. :twisted:

The wose compiler I've ever purchased...F#$%...sakes!!

Re: **Major Bug in PocketC Architect**

PostPosted: Wed Dec 12, 2007 1:32 am
by antix
Seems we have a case of user error. Why would you want to change that piece of code anyways? load; and load(); are different.

Re: **Major Bug in PocketC Architect**

PostPosted: Wed Dec 12, 2007 4:59 am
by Neilf
The popup list in the editor brings up the method "load" without braces that's why..

No compiler should ever compile code that outputs a blank screen. User error? You really think so...??
I wasted alot of time searching, which the compiler seens to ignore, talk about poor type checking or what!!

A simple warning would surfice.

"ANSI C programmers would not like this compiler, or even think of purchasing it,. That was my mistake... :oops: "

Re: **Major Bug in PocketC Architect**

PostPosted: Fri Dec 14, 2007 6:45 pm
by antix
My apologies. Might be a different kind of load. No clue. Sorry.