Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - linked lists and structures

linked lists and structures

Discuss PocketC for CE (including Desktop Edition)

Postby CivMan on Thu Aug 01, 2002 12:37 am

Hi,

I just bought my first PocketPC and I am looking for a programming language. I have tried a few small programs in PocketC without much success.

In one program i have used

#include "my Documents\\Personal\\linklist.h"
#include "my Documents\\Personal\\linklist.pc"

found here on this site but I can't build my application as I get a

Problem @ File my
Documents\Personal\linklist
.pc line 466
---------
Undeclared identifier
(LstBackInt)

message and I am clueless.....

also it doesn't say in the documentation that comes with it if you can create an array of dynamic structures with SctNew. Since you already need to use an array notation to access the elements of a single structure i wonder what would be the notation to access an array of structures.

On a last note is there a simple program frame somewhere to show how to use event(0) or event(1). I don't know which one i need, the documentation says that event(1) will wait for an event but when i tried something like

while(PgmActive) {
sleep(0);
ev=event(1);
DoSomething();
}

it doesn't wait and DoSomething gets executed the first time around.

Thanks to anibody that could shed some lights, one of the main reason I bought a Pocket PC was to program it and now i am getting a bit discouraged.
CivMan
 
Posts: 2
Joined: Thu Aug 01, 2002 12:13 am
Location: Canada

Postby guy on Thu Aug 01, 2002 4:37 pm

The LstBackInt() problem is a bug. Find the LstBackInt() function in linklist.pc and copy the definition of the function into linklist.h as a declaration. My apologies. It's been a long time since anyone used linklist.

As far a structs are concerned, linklist was developed for PocketC V2, in V3 you can actually declare structs as in real C, and create an array of them. There are workarounds elsewhere on the site for creating arrays of more than one dimension if you still need that.

The easiest way to get an example for using event() is to download the evaluation version of PCForm (link below) and use it to create a simple program, then look at the source code that it writes. Read the entgry in the PCform forum (link below) to find out about PocketPCs and the ESC key (required in PCForm eval because it is an old version).

There are almost no occasions when you need to use event(0). There is an example in the knowledge base that shows one occasion when it is useful.

Your event loop in the code you posted needs a switch() statement inside it to test the event code ev and the control ID for which it was delivered (call guiid()). You will get many events while a windows ce program is running, only a few of which you will want to do anything about. Look at the code generated by PCForm.

Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby CivMan on Fri Aug 09, 2002 1:16 am

Thanks a lot, you're answer was most helpfull.

I have been playing around with PocketC for the past 2 weeks and i am starting to make good progress.

When I run my app I notice that the screen as a usable height of around 265 pixels. Is it possible to go full screen and use all of the 320 pixels, it would be nice for the game I am making. I still use the trial version of PocketC, maybe it's because of that ?

Is there a more complete reference doc than the one provided with the trial version. For example I haven't seen the structs mentionned in any documents.

Thank You Again.
CivMan
 
Posts: 2
Joined: Thu Aug 01, 2002 12:13 am
Location: Canada

Postby guy on Fri Aug 09, 2002 8:33 am

Kevin hasn't been too good at keeping the documentation up with the code. Er, or the code up with the bugs.

Anyway. To make your application run full screen, you need to include the following line at the top of your source file:

#pragma PKPCFULLSCREEN

This tells the compiler to generate an application that steals the whole screen. Make sure that you provide a method of getting out of your program.

I don't think that PocketC structs are documented anywhere. I'm sure that something must have been posted sometime, now it's just folklore. The same is probably true of reference variables.

Some late documentation does appear in the knowledge base section of the forum. You need to make sure that you set the timescale box to display all posts, otherwise it will hide the old stuff (which is all of it).

There is some further PocketC documentation, but this became difficult to find when the OrbWorks site was revamped. You can still get to it by going to:

http://www.orbworks.com/wince/doc/index.html



Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 1 guest

cron