Previous Topic Next topic Print topic


COBCH1578 VALUETYPE instance field cannot have VALUE

An instance field in a valuetype cannot have a VALUE clause defined.

Remove the clause from the definition and recompile.

The following example contains an illegal construction for the #name instance field:

valuetype-id StudentRecord.
 01 #name string public VALUE "Mike Focus". *> remove the VALUE clause
 01 gpa float-short public.		
 method-id new.
  procedure division using by value nam as string, 
                                  gpa as float-short.
  set #name to nam
  set self::"gpa" to gpa
 end method.
end valuetype.
Previous Topic Next topic Print topic