Karel - Declaring an Array of Constants

  • Hey there,


    My issue is quite simple: I am using a set number of registers and declaring them at the begining in the CONST section. I would like to be able to put them all inside an array instead of having N different constants.


    I know I can put those values in an array by doing the following code and assigning it one by one but I'm wondering is if you can do it in one line as you can do in most languages, with something like: ARRAY=[1,5,8,4,7,12] (for example). Is that possible in Karel?



    EDIT: Posted in the wrong section by mistake, sorry.

    Edited 2 times, last by dcrb ().

Advertising from our partners