Previous Topic Next topic Print topic


COBCH1567 VALUETYPE definition must have at least one instance field

A valuetype must have at least one instance field in its construction.

The following valuetype has two instance fields.

valuetype-id StudentRecord.
 01 #name string public.   *> an instance field
 01 gpa float-short public. *> another instance field
 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