[squeak-dev] Re: Local variable in plugin

askoh askoh at askoh.com
Mon Nov 3 14:52:14 UTC 2008


It looks reasonable. Just ask vmmaker to compile the code and then look at
the C output.
Aik-Siong Koh


Ang Beepeng wrote:
> 
> How to initialize a local variable in plugin? 
> 
> Say I want to have something like this in c for my plugin. 
> 
> int myfunction (){ 
>    int* temp; 
> 
>    for(int i=0; i< 4; i++){ 
>    temp[i] = i; 
>    } 
> } 
> 
> I use 
> self var: #temp type: 'int *temp'.   
> for 
> int* temp
> 
> 1 to: 3 do:[:i| 
>    temp at:i  put: i].
> for the loop. 
> 
> It seems like I need to initialize temp or something.
> 
> Thanks. 
> 
> 

-- 
View this message in context: http://www.nabble.com/Local-variable-in-plugin-tp20298062p20304144.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.




More information about the Squeak-dev mailing list