Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #2557

How to test if a procedure is defined ?

Newsgroups comp.lang.postscript
From Peter Billam <peter@www.pjb.com.au>
Subject How to test if a procedure is defined ?
Message-ID <slrnnibqmm.54q.peter@box8.pjb.com.au> (permalink)
Date 2016-05-01 11:39 +0000
Organization Unlimited download news at news.astraweb.com

Show all headers | View raw


Greetings.  I'm wanting to put together something like perl or lua
'require', by testing if some procedure is defined, and if not
then run-ning the PS 'library' file that will define it.
But I don't see how to test if a procedure is defined. Anything like
  gloop type  or  gloop gcheck
just crashes if gloop is undefined, before type or gcheck get executed.
  /gloop type
just reports nametype, even if  gloop  doesn't exist.
Is there eg: a way to invoke  gloop  within a crash-free sandbox,
eg like  pcall  in lua ?  Any other way to test if it's defined ?

Thanks,  regards,
Peter

-- 

Peter Billam    www.pjb.com.au    www.pjb.com.au/comp/contact.html

Back to comp.lang.postscript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

How to test if a procedure is defined ? Peter Billam <peter@www.pjb.com.au> - 2016-05-01 11:39 +0000
  Re: How to test if a procedure is defined ? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2016-05-01 08:04 -0600
    Re: How to test if a procedure is defined ? Peter Billam <peter@www.pjb.com.au> - 2016-05-02 01:06 +0000
      Re: How to test if a procedure is defined ? luser- -droog <mijoryx@yahoo.com> - 2016-05-01 19:45 -0700
        Re: How to test if a procedure is defined ? Peter Billam <peter@www.pjb.com.au> - 2016-05-02 05:48 +0000

csiph-web