Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Aug 16, 2018 3:01 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: REALArray help
PostPosted: Wed Jun 10, 2009 10:09 am 
Offline

Joined: Wed Jun 10, 2009 9:51 am
Posts: 8
Hello I am trying to work with realarrays, I'm not too sure on the functionality of them though
and was hoping someone could give me an example much like the tutorial http://forums.realsoftware.com/viewtopic.php?f=5&t=26067 I am wanting to basically go through a loop in my c code
and add some values to a realarray and then return it in RB

so an pseudo example in c would be
//data is a string that is changed every loop
for (int i=0;i<10;i++){
RealArray[i] = data;//don't know what this is supposed to really be
data=new data;
}

//As you can see I have no idea for this
REALmethodDefinition ?defn = {
(REALproc) ?,
REALnoImplementation,
"?"
};


I hope this makes sense, what I want to do is pass an array from my RB plugin to RB.
That array comes from adding data from for loop.


Top
 Profile  
Reply with quote  
 Post subject: Re: REALArray help
PostPosted: Thu Jun 11, 2009 1:52 pm 
Offline

Joined: Wed Jun 10, 2009 9:51 am
Posts: 8
okay I got it to work, this code is rewritten so I hope its correct

static void sendArray(REALarray arr)
{
int i;



for(i=0;i<10;i++)
{

REALSetArrayValue(arr, i, sData);
sData=gData//change data for next loop
}

}


and other
(REALproc)sendArray,
REALnoImplementation,
"sendArray(arr() As String)"


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

All times are UTC - 5 hours


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group