i am doing a project. there are many global variables to be declared in one program.
my question is that:
how to import the global variables in one program from another program in karel?
is there any similiar function as: 'IMPORT PROGRAM a' ?
thanks
i am doing a project. there are many global variables to be declared in one program.
my question is that:
how to import the global variables in one program from another program in karel?
is there any similiar function as: 'IMPORT PROGRAM a' ?
thanks
KAREL programs can reference variables from other programs via the FROM keyword:
KAREL also features the %INCLUDE directive which literally includes a file line-for-line during translation:
Just make sure to use the FROM keyword, or the vars will just be duplicated in your new program.