Xref: utzoo comp.sys.mac.hypercard:2555 comp.sys.mac.programmer:9460 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!beach.cis.ufl.edu!pff From: pff@beach.cis.ufl.edu (Pablo Fernicola) Newsgroups: comp.sys.mac.hypercard,comp.sys.mac.programmer Subject: Array of characters in a XFCN Message-ID: <20979@uflorida.cis.ufl.EDU> Date: 4 Oct 89 00:15:44 GMT Sender: news@uflorida.cis.ufl.EDU Reply-To: pff@beach.cis.ufl.edu () Distribution: usa Organization: UF CIS Department Lines: 46 To use a string constant within a XFCN, using THINK C, one has to use RememberA0() and SetUpA4(). Well, now I am trying to use an array of string constants, but when I address the elements of the array I get junk. It sounds a lot like the problem I had with the string constants before using RemmeberA0 and SetUpA4. I am using THINK C 4. ----------------------------------------------------------------------------- #include#include "HyperXCmd.h" #include #include char entries[2][2][3] = {"11", "12", "21", "22"}; pascal void main(paramPtr) XCmdBlockPtr paramPtr; { char *header = "hello", temp[6]; RememberA0(); SetUpA4(); /* If I use the string "header" it works !!! strcpy(temp, header); */ strcpy(temp, (char *) entries[0][0]); paramPtr->returnValue = NewHandle( (long) strlen(temp) + 1); strcpy( (char *) *paramPtr->returnValue, temp); return; } -- pff@beach.cis.ufl.edu Pablo Fernicola - Machine Intelligence Laboratory - UF "If we knew how it works, it wouldn't be called research." -, _/: \ o.O , =(___)=