SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sun Sep 15, 2019 12:51 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Jun 29, 2011 10:32 am 
Offline

Joined: Sun Jun 01, 2008 1:18 pm
Posts: 32
Location: Paris France
Is there a way for OQ to execute the following snippet (getting error message for the 'unsafe' directive)?


public unsafe int[] getNamedVarDimension(string matrixName)
{
int[] iDim = null;
int iRows = 0;
int iCols = 0;

System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.getNamedVarDimension(ptrEmpty, matrixName, &iRows, &iCols);
if (SciErr.iErr == 0)
{
iDim = new int[2];
iDim[0] = iRows;
iDim[1] = iCols;
}
return iDim;
}

_________________
Thx!!


Top
 Profile  
 
PostPosted: Wed Jun 29, 2011 11:02 am 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi,

currently there is no support for "unsafe" code in strategies or scripts.
it's possible, we will add appropriate option to 'Build' settings in future, but right now you can compile this code into external dll and reference it in OQ.

Regards,
Alex

_________________
SmartQuant Development Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group