Karel-access to constants present in another program

  • HI all,

    i would like to know if it is possible from a karel program to access the constants declared in another program, for example with VAR data i proceed like this:

    Program Alpha



    END Alpha

    Program Beta

    VAR num FROM Alpha:INTEGER


    END Beta

    is it possible to do it also with CONST data?


  • AD
  • Hi,

    short answer no.

    When you "compile" a karel prog, the "names" of the constants will be replaces with the value(s) .... so they do not exist inside the .pc file

    (The description is not fully correct. But for understanding it's it might be okay.)

    Best regards


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now