Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!uhccux!virtue!canterbury.ac.nz!phys169 From: phys169@canterbury.ac.nz Newsgroups: comp.lang.pascal Subject: TP 6.0 Message-ID: <1990Oct4.162148.9314@canterbury.ac.nz> Date: 4 Oct 90 05:59:04 GMT References: <1990Sep26.024531.174@water.waterloo.edu> <26974@boulder.Colorado.EDU> Organization: University of Canterbury Lines: 20 In article <26974@boulder.Colorado.EDU>, streich@boulder.Colorado.EDU (Mark Streich) writes: > I want the ability to have public read-only fields in my objects so I > don't have to create functions for every field when I want to let > someone access the value of a field, but not modify it. > > example: > > rootclass = object > employee_num : string; readonly; > end; > > var anobj : rootclass; > > legal: > if anobj.employee_num = ... then > > illegal: > anobj.employee_num := ... ; > > Is this what people mean by "private" fields?