Call By String ???

Hello everybody!

I have a S4C controller and because of the small amount of memory left in the system i would like to load and unload modules from a floppy disc in automatic mode. The problem is that offcourse the system dont accept that i have “procalls” to routines that is not yet loaded in the system. I want to have specific names on my routines and therefore i cant use the CallByVar instruction. Is there any way to like “call a routine by a stringarray”?

Thanks in advance!

// Lars-?ke Fredholm, Sweden

Hi
Here is a way to call a routine by a string.

%“Palle”+NumToStr(nCurrentPalle,0)%;

If nCurrentPalle is for example 5 the routine
Palle5 will be called.

Thanks for the reply Per!

Here is how i solved the problem.

MODULE LARSA
! nArtikel f?r olika v?rden beroende p? val i en meny
PERS num nArtikel_1:=2;

! stMod inneh?ller namnen p? mina moduler p? disketten
CONST string stMod{2}:=[“RF.MOD”,“RF_Z.MOD”];

! stProc inneh?ller namnen p? rutinerna som finns i modulen jag just laddat
CONST string stProc_1{2}:=[“RamfKpl_1”,“RamfKplZ_1”];

PROC main()
! Laddar vald modul fr?n diskett
Load flp1File:=stMod{nArtikel_1};
! K?r vald rutin
%stProc_1{nArtikel_1}%;
ENDPROC
ENDMODULE