Can run program through b4ppc on device, but not compiled

Dragonspank

Member
Licensed User
:sign0085::sign0104:
I am working on a program and can run it through b4ppc on the device, but not a compiled version......out of memory errors.
It will only compile non-optimized and not forced qvga.
I'm new to this.
Is it possible to get someone to look at/run my program and help figure out what needs to be done to compile it optimized for device.
It's still a work in progress, but it works without errors in b4ppc.
Definitely not in commodre64 basic anymore! :(
 

agraham

Expert
Licensed User
Longtime User
Line 28 - You don't need a return in App_start, let it run off the end

Line 42 et.al - There isn't a Hide method for a Form. The IDE treats this as a do-nothing, the optimised compiler complains. Use Close, it doesn't actually close a Form, it hides it, except for the main form when it ends the app.

Line 66 et. al. - You can't jump out of a Sub with the optimised compiler. You should not need to use Goto anyway.

Line 111 et. al. - I don;t know if this is the cause of out of memory but you appear to be repeatedly calling AddEvent on the same controls each test. This should be done once only on initialisation.

Line 171 et. al. - Attempted Goto out of scope again!

Is that enough for now :)
 

Dragonspank

Member
Licensed User
thanks for the quick response! I'll start make the changes and let you know how it goes. Hopefully I'll grasp this programming language better soon!
 

Dragonspank

Member
Licensed User
Error compiling program.

Error compiling program.
Error message: CS1519:Invalid token '='in class, struct, or interface member declaration

Still not getting any further ahead..........all I seem to ham done is trippled my code and still get out of memory error on regular compile and the cs1519 on the other two compiles.
:sign0148:
 

junglejet

Active Member
Licensed User
Longtime User
espresult.text=((Right/(test))*100)

should be

espresult.text=(Right/test)*100

The compiler is sometimes picky on unnecessary brackets.
 

Roman

Member
Licensed User
Wrong pictures

In form7 you have 4 buttons with image ="esp_zh.bmp" - change to esp_zh.jpg
 

klaus

Expert
Licensed User
Longtime User
I have tried your code.

Changed in Form7 the bmp files to jpg.

I can compile, with B4PPC version 6.50, for the device and for the desktop in both compiling modes.
Even with the non necessary brackets in espresult.text=((Right/(test))*100)

I cannot compile for Smartphones, ImageButtons are not supported.

Are you shure that you compile exactly the same source code as the one you posted ? Because in that case you should have got the error with the bmp and jpg files.

Unfortunately I don't have an answer to your question, but at least you know that it should work.

Attached the 4 exe files.

What device do you have?

Best regards.
 

Dragonspank

Member
Licensed User
:signOops::sign0161:
Sorry, yes I forgot to change the form7 filenames to jpg's in the zip I attached. (had them right on the copy I was using on my computer though)

Tried my code on my computer at work, and it compiled fine..........so, I apparently have an issue with my home Basic4ppc/compiler/.net framework or something.

Thank-you all for the great help!!!!

I'm sure I will be back for help, on a new topic, once I try and figure out the hard stuff for my program like the table etc. But I will be of course returning to the tuturial/forum samples first.

Oh, and my device is an HP Ipaq 6945 pocket Pc.
 

Dragonspank

Member
Licensed User
ok, I have figured out that the problem on my home computer, that was giving the compile errors that I was still getting after everyones fantastic help:

Reinstalling Basic4ppc was the only thing that fixed the optimized compile errors.

Thanks again, everyone!
:sign0060:
 
Top