Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!galileo.cc.rochester.edu!troi.cc.rochester.edu!elmo From: elmo@troi.cc.rochester.edu (Eric Cabot) Newsgroups: comp.lang.pascal Subject: Re: passing two variables Message-ID: <1991Jun21.171623.14289@galileo.cc.rochester.edu> Date: 21 Jun 91 17:16:23 GMT References: <1991Jun21.144356.19598@javelin.sim.es.com> Sender: news@galileo.cc.rochester.edu Organization: University of Rochester - Rochester, New York Lines: 24 In <1991Jun21.144356.19598@javelin.sim.es.com> tpehrson@javelin.sim.es.com (Tim Clinkenpeel) writes: >i would like a function to pass back two variables. is this possible? >below is an example of what i'd like to accomplish: >cx,cy :=checkvalid(cx+offset,cy+offset); Well one approach would be to combine the two variables as one and then separate them after the function returns. For example if cx and cy are bytes then you could have cxcy defined as a word and just use Hi(cxcy) and Lo(cyxy) to get them. If cx and cy are words (or integers) then you could put them together as a longint and break that up. I hope this helps. -EC -- =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= Eric Cabot | elmo@uhura.cc.rochester.edu "insert your face here" | elmo@uordbv.bitnet =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=