string class field get set



string_class_field_get_set
Smart pascal source code
type TTest = class F: String := 'hello'; end; var o := new TTest; function Get: TTest; begin Result := o; end; WriteLn(o.F); WriteLn(o.F[3]); o.F[3] := 'z'; WriteLn(o.F); WriteLn(o.F[3]); Get.F[3] := 'y'; WriteLn(Get.F); WriteLn(Get.F[3]); {<<< RESULT - CONSOLE LOG >>> ----------------------------- hello l hezlo z heylo y ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}