Page 1 of 1

PostPosted: Sat Sep 16, 2006 4:34 am
by wjmal
Dear Samp,

All eight of my program files that used to compile in memos, are now converted to doc files. I am using QED. Handera Palm.

Docs ain't memos. In PDE, desktop PocketC, there is a menu called "Project file". When checked, it makes one file the main file (//), and other sub-files (/$) are then connected together.

To connect sub-files, I entered #include "filename", and a preprocessor "filename"();. Then I began the subfile with /$ "filename". In memos it compiled, alas, in doc files the compiler gives the error message "unable to find 'filename'". and a blinking cursor next to #include "filename".

The compiler now recognizes the main doc file with .pc suffix, but now what I don't know is the magic code to connect my subfiles to my project file.

Know any more magic?

Bill Mallory

PostPosted: Sat Sep 16, 2006 2:54 pm
by dewey
Your "subfiles" also need to have the .pc extension for the compiler to find them. Rename the doc files and then change the #include statements to match.

PostPosted: Sun Sep 17, 2006 3:42 am
by wjmal
Dear Mr. Dewey,

I tried that, and I probably did it wrong, because it didn't (for me) work.

I am afraid I am stuck with something called "bookmarks", which means something else. Now in addition to working on my PocketC program, I have to deal with ticks. What next? Fleas? Bedbugs?

I was so happy using PDE, but I need to be able to program on the hand held by itself, away from the computer.

Well, here I go.

Thank you for your prompt reply.


Bill Mallory

PostPosted: Sun Sep 17, 2006 5:19 am
by samps
Let's get a few conventions right before we start looking for bugs....

Your INCLUDE lines should read:

Code: Select all
include "filename.c"


Code: Select all
include "filename.pc"

with a single space between the word 'include' and the filename, which has to be enclosed by a ' " ' chareacter
no ' ; ' character at the end of the lines

The corresponding inclusion files should start with:

Code: Select all


Code: Select all

this is on the very first line, with no spaces and no embrasing ' " ' characters, nor a ' ; ' at the end.

hope this helps


PostPosted: Tue Sep 19, 2006 4:36 pm
by wjmal
No, nothing works. Still get the same "unable to find 'filename'", whenever the compiler encounters the include statement. If I copy the same files to memos, they compile and execute.

The following is a quote from PocketC Overview, a little further down from the .pc revelation.

Using "Doc" Files

Rather than using MemoPad to edit your source code, you can use the numerous doc editors available. A doc file's name must end in .c or .pc to show up in the Compile dialog, and must have the applet name as a // comment on the first line. The applet name may not be the same as the doc file name. Doc files that are "include"d do not have file name restrictions. Many doc editors support automatic bookmarks by beginning a line with a special character/word and including that character/word in angle brackets at the end of the file. To use bookmarks in PocketC source files, you must specify the bookmark character as the backtick `. This is very useful for adding bookmarks at the the location of functions. The uncompressed size of a doc file must be less than 64K.

My questions are, What is meant by "file name restrictions", and why, out of the blue, does "automatic bookmarks" get associated with "include"d? Do bookmarks replace "include"d statements? If so, how?

O well,

Bill Mallory

PostPosted: Tue Sep 19, 2006 7:26 pm
by wjmal

God (Allah, too) is great!

There are 16 4k memo limits in 1 Doc (64K) file. Rather than be bothered, for now, with includes, I think I can just list the functions, down the line.

I'll see if the compiler, too, is great. If so, you won't hear from me for a while, or till I run out of K's. Wish me luck.

I'm lucky to have this forum. When I have to put the problem into words, it helps you're there.

Bill Mallory