I think, traditionally, Halt is used to preemptively terminate a program. It should of course work okay, which could indicate a bug in the termination code. But usually would use just exiting the normal "PASCALMAIN" procedure as usual
I think, traditionally, Halt is used to preemptively terminate a program. It should of course work okay, which could indicate a bug in the termination code. But usually would use just exiting the normal "PASCALMAIN" procedure as usual
Peregrinus, expectavi pedes meos in cymbalis
Nullus norvegicorum sole urinat
You got the prices wrong. One SDL iPhone license costs 100$ and -10% for every following iPhone license you purchase and finally down to 50$. I know it, I bought a license.
Also your Carbon code won't work on the iPhone as only Cocoa is allowed on iOS. Carbon has marked as deprecated by Apple since Mac OS X 10.5.
For Cocoa you should take a look at Objective-Pascal.
Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)
Programmer: A device for converting coffein into software.
Oh I see, it's not that bad then, but since I already have code for all SOs, well, I just need to switch from Carbon to Cocoa then.
Hmm, objective Pascal, does FPC have Cocoa headers?
This has probably been found by any of those looking into Objective-Pascal or Cocoa for Pascal, but here it is just the same: http://wiki.freepascal.org/FPC_PasCocoa
It outlines the initial idea behind Objective-Pascal and how it was implemented by the Free Pascal compiler team. It also tells you how to enable it for your projects too.
Thanks! I've been reading about Cocoa, and Objective Pascal, and how it all works, I still need some days to understand it correctly.
My next question, tough, this should be probably in a new topic:
Today I managed to compile a Free Pascal program for iPhone using XCode and the included template.
However when reading the code, I found that it was not 100% pascal, at least half of the code were Objective C, and the pascal code was declared as external in a library.
I understand how this works, but is it the only way?
Or can one create an app for iPhone that uses only pascal, and is compiled just using the command line?
There are two other ways:
1. Use SDL which takes care of most things. Remember, you can use SDL free of charge if you're application is released as GPL, only if you to release your application as freeware or commercial you need to buy a license before the application is released.
2. Use Objective-Pascal as explained here: http://www.thealchemistguild.org/pascal/ <-- Take a look at the iArkanoid example.
Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)
Programmer: A device for converting coffein into software.
Thank you Stoney, I did not know that website, it contains really useful information
I'm planning to release comercial applications, but SDL price is okay, I will look how much work is needed to replace it tough.
You mean the Objective-C library called FPC code? I have messed a lot with mixing C and FPC code, and recently learned the right way to do that, and that is indeed to put all the FPC code in a separate dylib library (shared library). It is theoretically possible to do static linking, but don't even try, it is not worth it.
However, the Objective Pascal dialect works very well (Stoney's suggestion #2). That's what you should use. It is still changing, which can be a bit frustrating at times, but it works.
Not a solution for iOS, where dylib's are not allowed.Originally Posted by Ingemar
I don't know if I already said so, but I got this working, for both Mac and iOS (here I use the solution of mixing pascal with Objective-C, since I had some problems with the objective pascal compiler). I will probably try to move into Objective Pascal later tough.
Bookmarks