PDA

View Full Version : WM Programming-Pascal and C console programs


RedSnake9
5th October 2009, 07:22 PM
Hi everyone!
I'm studying Turbo Pascal and C programming languages at school,I write console programs from "add 2 numbers and print the result" to something more complex.
I was wondering...is there any way to get these simple console programs to work on my HTC Touch PRO 2 (WM 6.1)?
Hope you can help me...
Thanks!

myrandex
5th October 2009, 07:30 PM
I 2nd this, I'd like to know too.

Or otherwise I'm also interested in writing a basic app for WM just to try it.

Jason

Rudegar
5th October 2009, 07:31 PM
easy to do with c using embedded visual c++ which you can google and it's free and c++ is always backward compatible with ansi c

doubt you will have much luck with pascal because the best bet would have been borlans options and they quit the whole market with their delphi pascal options
nailing the last nail in the coffin of pascal

Chainfire
5th October 2009, 07:37 PM
For Pascal, use FreePascal/Lazarus combo. It's a ***** to set up, though.

RedSnake9
5th October 2009, 07:41 PM
easy to do with c using embedded visual c++ which you can google and it's free and c++ is always backward compatible with ansi c

doubt you will have much luck with pascal because the best bet would have been borlans options and they quit the whole market with their delphi pascal options
nailing the last nail in the coffin of pascal

Can I write console applications with it,or they have to have a GUI?

For Pascal, use FreePascal/Lazarus combo. It's a ***** to set up, though.

Yeah,i tried that,but i can't make it work...I followed the guide but i can't do anything that works on WM

Rudegar
5th October 2009, 08:33 PM
"Can I write console applications with it,or they have to have a GUI?"

both a lot easier to make console apps though

RedSnake9
5th October 2009, 09:31 PM
Thank you,I'll give it a try ;)

stephj
6th October 2009, 01:41 PM
The problem you will encounter with console applications is the fact that there is no console as such.

printf() will not work as there is no output window on which to write anything. There is also no way of reading user input direct from the 'keyboard' or keypad.

When the exe is run it starts as a windowless application, the WinMain() function is called and when this ends it is terminated. You can open and close files, read and write to and from them, anything you like, as long as it requires no user input, and does not display anything. Pretty restrictive! The only thing the user will see is the hourglass/busy icon, until the app finishes.

Even C# console applications are subject to the same restrictions.

To do anything 'smart' it will have to be a PPC (GUI) application.

Rudegar
6th October 2009, 07:14 PM
there are plenty of free console apps one can download for free

RedSnake9
7th October 2009, 05:56 PM
The problem you will encounter with console applications is the fact that there is no console as such.

printf() will not work as there is no output window on which to write anything. There is also no way of reading user input direct from the 'keyboard' or keypad.

When the exe is run it starts as a windowless application, the WinMain() function is called and when this ends it is terminated. You can open and close files, read and write to and from them, anything you like, as long as it requires no user input, and does not display anything. Pretty restrictive! The only thing the user will see is the hourglass/busy icon, until the app finishes.

Even C# console applications are subject to the same restrictions.

To do anything 'smart' it will have to be a PPC (GUI) application.

What if I use Pocket Console,or something like that? Would they run correctly?

stephj
7th October 2009, 06:12 PM
Can't really say, as I haven't used them. The console stuff I have written, drags objects from over the net, then writes the data out in a format I can use to a file on the device. No user input required.

All I can suggest is to try the classic

printf("Hello World!\n")

and see what happens. Good Luck!

xdawis
7th October 2009, 06:36 PM
Hello,

yes, you can. Just use pocketdos. An emulator for DOS and you can use your simple compilers


Search for Pocketdos.com

RedSnake9
13th October 2009, 09:19 PM
Hello,

yes, you can. Just use pocketdos. An emulator for DOS and you can use your simple compilers


Search for Pocketdos.com

Thank you! They work now! PocketDos is great!