Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!sun-barr!olivea!tardis!jms From: jms@tardis.Tymnet.COM (Joe Smith) Newsgroups: comp.lang.postscript Subject: Re: Help need in PS programming Summary: Get the "Red" book. Keywords: postscript Message-ID: <1737@tardis.Tymnet.COM> Date: 15 Apr 91 07:34:13 GMT References: <1991Apr11.041929.16118@noose.ecn.purdue.edu> Reply-To: jms@tardis.Tymnet.COM (Joe Smith) Organization: BT Tymnet, San Jose, CA Lines: 24 In article <1991Apr11.041929.16118@noose.ecn.purdue.edu> srin@barley.ecn.purdue.edu (Raghavan Srinivasan) writes: >I just started to learn PS programming. I have following questions to be >answered. I would appreciate any info in this regard. >1. like in 'C', is there any way where a subroutine can return a string or int. If yes, any example please. >2. How to send say the first item of the stack in the form of an array to another routine? >3. How the arrays are stored in a stack? The answers to all your questions are in the Red Book: PostScript Language Reference Manual Adobe Systems Incorporated Addison Wesley ISBN 0-201-10174-2 ISBN 0-201-10169-6 1. A routine can return ANYTHING on the stack. This can be any of: array, boolean, dict, file, font, integer, mark, name, null, operator, packedarray, real, save, string. See the 'type' operator. 2. Check '[' and ']' on how to build an array. 3. Arrays are stored as arrays. -- Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms PO Box 49019, MS-C51 | BIX: smithjoe | CA license plate: "POPJ P," (PDP-10) San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga 3000 speaks for me."