tests/syntax/enumeration/enumerationvalue.txt
author mjsousa
Sun, 19 Oct 2014 08:36:49 +0100
changeset 936 0f7bcc160568
parent 109 3af0b849b9c6
permissions -rwxr-xr-x
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
Note that multiple de-referencing of structs (struct_ptr_ptr^^.elem) is not supported inside FB code (this would need BIG changes to the compiler!)



TYPE
 enum_type00 : (enum_v1, XXXX, enum_v2) := XXXX;
END_TYPE

TYPE
 enum_type01 : (XXXX, enum_v2) := XXXX;
END_TYPE

TYPE
 enum_type02 : (enum_v1, XXXX) := XXXX;
END_TYPE

TYPE
 enum_type03 : (XXXX) := XXXX;
END_TYPE




function foo : int
 var_input
  a_1, b_1: int;
 end_var
 var
  c_1, d_1: enum_type00;
(*
  enum_v1 : enum_type00;
*)
 end_var
  c_1 := enum_type00#XXXX;
  c_1 := XXXX;
  c_1 := enum_v1;
(*
  enum_v1 := enum_v1;
*)
end_function