The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Arrays in Origin C

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
sualk Posted - 07/05/2004 : 03:48:51 AM
While it seems to be possible to declare arrays of complex object in
Origin C it is not possible to access them

Example :

Dataset DD[3];
DD[0].Attach("Data1_A");
DD[1].Attach("Data1_B");
DD[2].Attach("Data1_C");
(DD[0])[1] = j;
(DD[1])[2] = j;
(DD[2])[3] = j;

Compiles fine but
(DD[0])[1] = j;
results in a crash

it seems that the []operator is not fully implemented and not documented in Origin C

Can anyone help ?
2   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 07/05/2004 : 1:48:38 PM
Perhaps the parenthesis are the problem. Should probably be this...

DD[0][1] = j;
DD[1][2] = j;
DD[2][3] = j;

Mike Buess
Origin WebRing Member
cpyang Posted - 07/05/2004 : 12:48:55 PM
Which version of Origin are you using? I tried the following code in Origin75 SR1, and it works fine


void tt()
{
Worksheet wks = Project.ActiveLayer();

Dataset dd[3];
int ii;
for(ii = 0; ii < 3; ii++)
{
dd[ii].Attach(wks, ii);
dd[ii].SetSize(100);
}

for(ii =0; ii < 3; ii++)
{
for(int jj = 0; jj < 100; jj++)
dd[ii][jj] = ii+ 0.1*jj;
}
}






The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000