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


Groups > comp.lang.postscript > #1542

Re: Checking the stack is empty at the end of the program

From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.postscript
Subject Re: Checking the stack is empty at the end of the program
Organization Decebal Computing
References <874nba9xyd.fsf@Aspire.decebal.nl> <0d33f73c-7f0b-4c68-a1da-d181c4de5eae@googlegroups.com>
Date 2013-08-01 02:36 +0200
Message-ID <87zjt28cxj.fsf@Aspire.decebal.nl> (permalink)

Show all headers | View raw


Op donderdag 1 aug 2013 00:41 CEST schreef luser:

> On Wednesday, July 31, 2013 5:16:58 PM UTC-5, Cecil Westerhof wrote:
>> I would like to check that the stack is empty when a program is
>>
>> finished. For this I made the following function:
>>
>> /endProgram {
>>
>> (end program) ==
>>
>> pstack
>>
>> (there should be nothing between (end program) en this line) ==
>>
>> } def
>>
>>
>>
>> But this displays:
>>
>> (end program)
>>
>> (there should be nothing between \(end program\) en this line)
>>
>>
>>
>> It is not a very big problem, but could I display:
>>
>> (end program)
>>
>> (there should be nothing between (end program) en this line)
>>
>>
>
> Put the outer parentheses inside the string and use `print`.
>
> ((there should be nothing between (end program) and this line))
> print

Then there is no newline. I changed the code to:
    /endProgram {
        ("end program") ==
        pstack
        (there should be nothing between "end program" and this line) ==
    } def

That is reasonable clear I think.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

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


Thread

Checking the stack is empty at the end of the program Cecil Westerhof <Cecil@decebal.nl> - 2013-08-01 00:16 +0200
  Re: Checking the stack is empty at the end of the program luser- -droog <mijoryx@yahoo.com> - 2013-07-31 15:41 -0700
    Re: Checking the stack is empty at the end of the program Cecil Westerhof <Cecil@decebal.nl> - 2013-08-01 02:36 +0200
  Re: Checking the stack is empty at the end of the program Dan Coby <adcoby@earthlink.net> - 2013-07-31 18:36 -0700
    Re: Checking the stack is empty at the end of the program luser- -droog <mijoryx@yahoo.com> - 2013-07-31 23:53 -0700
      Re: Checking the stack is empty at the end of the program Cecil Westerhof <Cecil@decebal.nl> - 2013-08-01 10:41 +0200
        Re: Checking the stack is empty at the end of the program luser- -droog <mijoryx@yahoo.com> - 2013-08-01 02:37 -0700
          Re: Checking the stack is empty at the end of the program Cecil Westerhof <Cecil@decebal.nl> - 2013-08-01 12:40 +0200
            Re: Checking the stack is empty at the end of the program luser- -droog <mijoryx@yahoo.com> - 2013-08-01 03:53 -0700
              Re: Checking the stack is empty at the end of the program luser- -droog <mijoryx@yahoo.com> - 2013-08-01 03:56 -0700
                Re: Checking the stack is empty at the end of the program luser- -droog <mijoryx@yahoo.com> - 2013-08-01 04:23 -0700
                Re: Checking the stack is empty at the end of the program Cecil Westerhof <Cecil@decebal.nl> - 2013-08-01 15:45 +0200
              Re: Checking the stack is empty at the end of the program Cecil Westerhof <Cecil@decebal.nl> - 2013-08-01 13:18 +0200
                Re: Checking the stack is empty at the end of the program luser- -droog <mijoryx@yahoo.com> - 2013-08-01 09:33 -0700
                Re: Checking the stack is empty at the end of the program luser- -droog <mijoryx@yahoo.com> - 2013-08-01 18:25 -0700

csiph-web