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

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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[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 - Native add-ins for PocketC Architect - questions

Native add-ins for PocketC Architect - questions

Discuss OrbForms Designer and PocketC Architect

Postby mgreen on Tue Mar 21, 2006 3:23 am

val_newString, val_newConstString, and val_copyString all take a Value pointer. Do they set the type field of the Value or just the sVal?

When a native add-in is called, is the Value pointed to by vm_retVal initialized? If so, to what?
-----
Michael Green
mgreen
 
Posts: 72
Joined: Fri Mar 14, 2003 9:40 pm
Location: USA

Postby mgreen on Tue Mar 21, 2006 2:35 pm

Another question ..

When a struct is to be returned from a function, there's a struct passed to the function as an additional parameter for the return value. What is that struct initialized to? In particular, are the types of the fields initialized to how they're declared? If some of them are strings, how are they initialized and do they have to be released before a new value is assigned by the function?
-----
Michael Green
mgreen
 
Posts: 72
Joined: Fri Mar 14, 2003 9:40 pm
Location: USA

Postby dewey on Wed Mar 22, 2006 2:17 am

The val_ string functions also set the type.
vm_retVal is vtVoid, iVal == 0 when a native add-in is called.

When a struct is returned, the struct passed to the function is a valid struct whose fields are already initialized. Any strings in the struct must be freed if they are going to be overwritten.

The struct passed to the function will either be a temp stack variable created by the compiler, or the variable on the left side of an assignment.

e.g.
Code: Select all
struct Point { int x; int y};
Point getPoint() @ library...

void func() {
  Point pt;
  int x;
  pt = getPoint();  // address of pt will be passed to getPoint
  getPoint();       // address of compiler temp will be passed to getPoint
  x = getPoint().x; // address of compiler temp will be passed to getPoint
}
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby mgreen on Wed Mar 22, 2006 3:12 am

Thank you.

For those interested, I'm working on a native add-in to allow PocketC Architect and OrbForms users to use HanDBase much as you can use HanDBase from PocketC using PToolboxLib. The add-in is written in Palm Pascal (see <http://www.ppcompiler.org/?lng=en>) which runs on the Palm. I plan to upload both the add-in and the native add-in interface declarations to the Palm Pascal site library when I've got them working satisfactorily.
-----
Michael Green
mgreen
 
Posts: 72
Joined: Fri Mar 14, 2003 9:40 pm
Location: USA


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 4 guests

cron