Problems with Array()

A PocketC native palm library offering native forms and assorted utilities

Postby RunningUtes on Sat Jun 12, 2004 4:47 pm

I'm using the array demo code:
Code: Select all
//Array example
library "PtoolboxLib"
pointer data;
data = Array("cis,2,3"); //creates a 2 by 3 array
data[0][0] = 'a'; //char
data[0][1] = 1; //integer
data[0][2] = "first"; //string
data[1][0] = 'b'; //char
data[1][1] = 2; //integer
data[1][2] = "second"; //string
puts(data[0][0]+", "+data[0][1]+", "+data[0][2]+"\n");
puts(data[1][0]+", "+data[1][1]+", "+data[1][2]+"\n");
free(data); //free data memory

It should compile correctly, but I am getting an error: File: Array example Line: 4 syntax error in declaration. The error occurs with with the Array() command. I am using PocketC v6.5.1 and PToolbox v7.6.2beta9.
Posts: 20
Joined: Sun May 30, 2004 3:27 am

Postby jstadolnik on Sun Jun 13, 2004 12:43 pm

This code sample doesn't have a main() call... it needs one.


The PToolboxLib guy.
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby RunningUtes on Mon Jun 14, 2004 10:25 pm

Well I was just stupid about that one.
Posts: 20
Joined: Sun May 30, 2004 3:27 am

Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 1 guest