Page 1 of 1

PostPosted: Sat Jun 12, 2004 4:47 pm
by RunningUtes
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.

PostPosted: Sun Jun 13, 2004 12:43 pm
by jstadolnik
This code sample doesn't have a main() call... it needs one.


The PToolboxLib guy.

PostPosted: Mon Jun 14, 2004 10:25 pm
by RunningUtes
Well I was just stupid about that one.