Hello. Can I change the data type of one value? I want to change from REAL to INTEGER.
Karel--change data type
-
chrissiapla -
June 7, 2013 at 9:27 AM -
Thread is marked as Resolved.
-
-
Use an editor to edit the KL file and in the VAR's list, where the variable is declared as an :REAL , just declare it as :INTEGER instead. That easy. Recompile and transfer it to the robot.
-Eric
-
You will get a Type-Mismatch error if you change the data type without first deleting the variable. First go to KCL and type in DEL VAR variable name. Then make your program changes, and recompile.
-
you cannt change init var wothout recompile, but you can take integer value of real into integer var.
Karel source: