mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 13:59:28 +02:00
palmunits: added a simple 'Hello, World' for PalmOS
git-svn-id: trunk@37903 -
This commit is contained in:
parent
a371b39ee9
commit
f609c55b59
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6668,6 +6668,7 @@ packages/os4units/src/workbench.pas svneol=native#text/pascal
|
||||
packages/palmunits/Makefile svneol=native#text/plain
|
||||
packages/palmunits/Makefile.fpc svneol=native#text/plain
|
||||
packages/palmunits/Makefile.fpc.fpcmake svneol=native#text/plain
|
||||
packages/palmunits/examples/hello.pas svneol=native#text/plain
|
||||
packages/palmunits/fpmake.pp svneol=native#text/plain
|
||||
packages/palmunits/src/aboutbox.pp svneol=native#text/plain
|
||||
packages/palmunits/src/alarmmgr.pp svneol=native#text/plain
|
||||
|
24
packages/palmunits/examples/hello.pas
Normal file
24
packages/palmunits/examples/hello.pas
Normal file
@ -0,0 +1,24 @@
|
||||
{$APPID FPHL}
|
||||
{$APPNAME Hello, FPC}
|
||||
program hello;
|
||||
|
||||
uses
|
||||
event_, sysevent, systemmgr, window;
|
||||
|
||||
const
|
||||
message = 'FPC says: Hello, Palm!';
|
||||
|
||||
procedure EventLoop;
|
||||
var
|
||||
event: EventType;
|
||||
begin
|
||||
repeat
|
||||
EvtGetEvent(event, evtWaitForever);
|
||||
SysHandleEvent(event);
|
||||
until (event.eType = appStopEvent);
|
||||
end;
|
||||
|
||||
begin
|
||||
WinDrawChars(message, length(message), 35, 74);
|
||||
EventLoop;
|
||||
end.
|
@ -123,6 +123,9 @@ begin
|
||||
P.Targets.AddUnit('pdilib.pp',[PalmOS]);
|
||||
P.Targets.AddUnit('helperserviceclass.pp',[PalmOS]);
|
||||
|
||||
P.ExamplePath.Add('examples');
|
||||
P.Targets.AddExampleProgram('hello.pas');
|
||||
|
||||
{$ifndef ALLPACKAGES}
|
||||
Run;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user