On Thu, 20 Jul 2017 11:11:50 +0200, Maciej Izak
<hnb.c...@gmail.com> wrote:

>2017-07-20 11:03 GMT+02:00 Bo Berglund <bo.bergl...@gmail.com>:
>
>> So since I don't really want to use a global, is it possible to
>> declare a local variable static in the sense that it retains its
>> values across calls to the procedure?
>> If so how is it done?
>>
>
>procedure foo;
>{$PUSH}
>const{$J+}
>  s : string ='';
>{$POP}

Thanks,
but it looks a bit involved, probably better to use an object field
variable instead only accessible from the internal methods.


-- 
Bo Berglund
Developer in Sweden

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to