123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|683|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Handheld Coding -> Pascal - MIDLet Pascal

Thu, 30 Sep 2010, 08:37
soulas85
Hi can anyone convert mine PASCAL code, to MIDLet Pascal, that i could use this program on mobile phone.
Thanx.

Thu, 30 Sep 2010, 09:19
Jayenkai
You'll probably find it easier to redo the function from start.
Pascal assumes it's running in a DOS style command box, whereas MidletPascal is all about forms and things like that.

You could make a nice App out of this, if you wanted to, but don't expect a quick "flip'n'switch" transfer.

Try creating three input areas (a/b/c) to input the values, and then place the rest of the function into a loop, so that it can sum up the results in realtime, as you're inputting the values into the form itself.
Should be quite neat.

If I had MidletPascal installed (it's been a long while!) I could probably guide you better, but look into the form based stuff in MP's help file.

You basically just want to remove all those ReadLn and WriteLn functions, and swap with Form stuff (input for ReadLn, changable values for WriteLn), because the console commands won't work on a phone.

(I've repeated myself quite a bit there, but that's only to drum home the fact that phone!=dos, and you do need to reconstruct quite a bit of it, before it'll work.)

-=-=-
''Load, Next List!''
Thu, 30 Sep 2010, 10:43
soulas85
the biggest problem is, that i don't know what i need to switch ReadLn to (WriteLn = DrawText). If anyone can tell me what ReadLn = , i could edit this APP
Fri, 01 Oct 2010, 05:05
bram32
readln is like an Input command, right? You might wanna replace that with a text input box, and then use the value that is entered there.
Fri, 01 Oct 2010, 16:48
pretender
Hi!
I just come to discover this forum dealing with MIDlet Pascal. And it's great.

There're some interesting tutorial a friend and i have written on MIDlet Pascal. They show how to begin with it, and how to do advance programing. Those tutorials are in french so you can use google translate to read them.
my stuff :darrylsite.developpez.com
friend link : krachik.developpez.com
If you want some example of program like mario sokoban, puzzle; you can visit my website : www.darrylsite.com/index.php?ref=source&lang=JPascal
Sun, 03 Oct 2010, 09:00
Pio
A modified example from MIDletPascal help...


Tue, 05 Oct 2010, 05:27
soulas85
Pio, your app doesn't work, then i write in a, b, c it shows white screen and nothing more? Could you edit it?
Tue, 05 Oct 2010, 08:43
Jayenkai
Why don't you try editing it. No point in not learning this stuff.

-=-=-
''Load, Next List!''
Tue, 05 Oct 2010, 14:05
Pio
It works in my emulator... But maybe you typed 1 2 1 and got D=0? That possibility is not covered by program.