ROSS@UCF1VM.BITNET (Bri) (08/05/90)
I don't seem to be following this problem with generic lists. I have routines implementing generic stacks in 2 different methods lying around here somewhere. They were written in Logitech Modula-2 with no problems. The first algorithm uses the ARRAY OF BYTE to allow an size field to be passed onto the stack. Consistency of stack items could be inforced by checking the HIGH() of the parameter to see if they are the same memory size. This is no different the C, which could give a flip (well, it'll give you warnings if you are man enough to have warnings turned on) about what values and types you pass and assign. The other method is to just pass an address, and put the address on the stack. This is definately more generic, but a lot harder to control what type of items are put on the stack. I guess my main problem is, if you want routines to implement a generic structure, why be concerned how they work -- just concern yourself with how well do they work? As a programmer, I'd be interested about the workings of routines, but as long as they wor<{k correctly, no need to worry! ROSS@UCF1VM.BITNET ROSS@UCF1VM.CC.UCF.EDU ROSS@UCFLAN.CC.UCF.EDU