E. C Code
Home ] 1. The CASLide ] 2. First Application ] 2. Floating Math ] 3. Dates and Times ] 4. Strings ] 5. Previous Program State ] 6. Data Browser ] 7. Data Entry ] 8. Conduit and Desktop Companion ] 9. Games ] 10. Graphics ] 11. Sound ] 12. Communications ] 13. Accessing Palm Databases ] 14. Distributing CASL Applications ] A. Programming Style ] B. Objects ] C. Positioning Objects ] D. POSE ] [ E. C Code ]

 

Use the C sample apps and help files to create this chapter.

In general normal CASL uses an external C library compiled to a prc file which acts as an extention to the runtime. There's an accompanying cpk file which providers the external runtime link information for your normal CASL program to make calls to this external library.

With CASLpro, we take advantage of the idea that after CASL code in compiled to C code, the C code has to be compiled to native object code and made into a prc file. It's during this 2nd step that we add external C files into the compile process, rather than have external runtime libraries. You still need a cpk file to define the external links to the c code.

There's 2 ways to "tell" the 2nd stage (the C_Build.bat file) that you want to include a C file into your CASLpro program.

  • create a CASL_optional.c and CASL_optional.h files and specifies the files you want, or
  • use the CASLide menu option Projects | Add Files, and specify the c file(s).  Have your c file include a C code statement like, #include "filename.h" to include C code header files.

This later technique is now the recommended way, and is more convenient.

 

 

 

[ Top ]

© 2001, Feras Information Technology. All rights reserved.