[Lazarus] Console App Development

Sven Barth pascaldragon at googlemail.com
Thu Aug 11 21:33:50 CEST 2011


On 11.08.2011 20:43, Alexsander Rosa wrote:
> Should we use CRT or VIDEO unit? What's the state of Free Vision? We
> plan to port our WMS (Warehouse Management System) module from C to
> Pascal (to use our persistence framework). It has a few colors, a
> numbered menu and a few scrollable lists. The module usually is run thru
> Putty from mobile computers like MC-3090 (Windows CE + WiFi).

I can't speak for Free Vision (the only real world reference application 
seems to be the IDE and there's also a testapp in the 
$fpc/packages/fv/examples directory), but I can say a bit regarding CRT 
and VIDEO:

VIDEO seems to be targeted for "fullscreen" applications, because you 
basically work on a buffer that represents the complete screen. You 
won't be able to use UTF8 or Unicode characters and are thus restricted 
to what the unit gives you, but it tries to somehow map the block 
drawing characters into the extended ANSI area (> #127). Free Vision is 
based upon the VIDEO unit.

CRT allows you to only print to a part of the screen and will also allow 
you to write UTF8 characters as it's basically just a redirected Writeln 
that somehow injects the changes of fonts and the cursor movement. You 
should also be able to generate a fullscreen application though.

So it depends on what you want to achieve. You'd need to test whether 
those units work on Win CE at all though, because I can't help you here 
(I was never able to get the console on my Windows Mobile running :( )

Regards,
Sven




More information about the Lazarus mailing list