Re: [POLL] Typing elements within a Type
- Posted by Salix <salix at freemail?h?> Aug 30, 2007
- 543 views
Hello Peter, I've already voted but there a few things I'm not sure I understood correctly. == 2nd question == I voted for A1 but do I understand right that A1 would allow me to define things also this way? Variation A1 (modified)
type customer( sequence x ) fields integer x[1] sequence x[2] sequence x[3] atom x[3][1] integer x[3][2] atom x[3][3] end fields -- insert other code here end type
What do you mean by "other code"? Wouldn't you (we ) want to allow this syntax? Variation A1 (modified)
type customer( sequence x ) fields integer x[1] sequence x[2] sequence x[3] x[1]>0 x[1]<100 end fields -- insert other code here end type
I don't think that the clarification would influence my answer given earlier but might be useful information for others. It might also help me to understand what to expect. (What about B1?) == 3rd question == I voted for A2 but does it also meant that you can use it like this? Variation A2 (modified)
type customer( sequence x ) fields integer x[1] id sequence x[2] name sequence x[3] address atom x[3][1] ZIP -- integer x[3][2] nr -- house nr atom x[3][3] floor end fields -- other code here end type customer x x={0,"",{0,0,0}} x[id]=1 x[name]="Szabó András" x[address][ZIP]=2475 x[address][nr]=18 x[address][floor]=1
Again, I don't think your explanation will change my vote, it's just that I want to have a clear picture what we're taliking about and possibly help the future voters. (What about B2?) Thanks in advance! Salix