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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 SetSize for Dataset
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter.cook

UK
356 Posts

Posted - 11/03/2003 :  04:19:03 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

Can someone please explain why I have to SetSize the Origin C datsets in order to work correctly? For MOCA dlls this isn't required.

Does the SetSize have any affect on the Origin dataset during and after running of function?

Also, if the SetSize is required and I'm in debug mode having put a break point in say the first line of the function then it isn't picked up by the debugger when runing. I have to selectively comment out parts of the function to pick this problem up.


Cheers,

Pete


Mike Buess

USA
3037 Posts

Posted - 11/03/2003 :  08:30:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Pete,

I'm not quite sure what you mean by SetSize being required. I rarely use SetSize with datasets.

Dataset d0("Data1",0);
Dataset d1("Data1",1);
Dataset d2("Data1",2);
d2 = d1 - d0;

Can you give an example where SetSize is needed?

...Perhaps you mean datasets created by your function?

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 11/03/2003 08:50:45 AM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 11/03/2003 :  09:19:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
SetSize is needed to allocate more rows in a column (dataset).
MOCA dlls does not need this because Origin automatically add more rows when you make calls to access them.

Origin C Dataset does not automatically add rows because Dataset is derived from vector, which you will need to to allocate before you can access elements, mainly a performance issue.

CP


Go to Top of Page

easwar

USA
1965 Posts

Posted - 11/03/2003 :  09:30:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Pete,

Also note that you can use the Add method in vector class to add an element to a vector or dataset. This could be useful when you are creating and using a new vector/dastaset object and do not necessarily know/want to set the size.

Easwar
OriginLab.


Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000