Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!chaph.usc.edu!aludra.usc.edu!ajayshah From: ajayshah@aludra.usc.edu (Ajay Shah) Newsgroups: comp.lang.pascal Subject: Absolute troubles Message-ID: <7559@chaph.usc.edu> Date: 22 Jan 90 19:09:15 GMT Sender: news@chaph.usc.edu Reply-To: ajayshah@aludra.usc.edu () Organization: University of Southern California, Los Angeles, CA Lines: 44 Consider this code: -------------------------Start type VectorType = array[1..10] of real; procedure xxx(var theta:VectorType); var sigma : real absolute theta; beta : VectorType absolute theta[2]; begin end; -------------------------End I'm trying to pass a stacked vector and reference it as two distinct vectors internally (instead of having code like theta[i+1] to reference subscript i of beta). He doesn't let me do this (tp5.5, i.e.). The declaration for sigma is fine, the declaration for beta is not. What am i missing? Is there a fix on the lines of -------------------------Start var sigma : real absolute theta; beta : ^VectorType; begin beta := ptr(theta[2]) end; -------------------------End The code above may not be syntactically immaculate (i'm not fluent with such C-style dirty pointer manipulations). The basic idea is to declare beta as a pointer, never new it, and just set it to point to theta[2] and use it as a VectorType. Ideas on this? _______________________________________________________________________________ Ajay Shah, (213)747-9991, ajayshah@usc.edu The more things change, the more they stay insane. _______________________________________________________________________________