[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] difference between next-listing and position
- Subject: RE: [sqr-users] difference between next-listing and position
- From: "Steve Cavill" <steve.cavill@infoclarity.com.au>
- Date: Mon, 23 Jul 2007 21:12:51 +1000
- Delivery-date: Mon, 23 Jul 2007 07:16:28 -0400
- In-reply-to: <60513ea70707222300r423d38b5m70cb90f4c0a58325@mail.gmail.com>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcfM7zOzjOVvjCgvRRmdqUAbOFMAOAAKTw+A
Position and next-listing both move the print position on the page.
The main difference is the position command does not change the line numbers.
Next listing moves the print position down AND ALSO changes the current line
number (after the move) to be line 1
Position can move both up and down, but next listing can only move down.
E.g.
Position (1)
Print 'line one' (,1)
Position (+1)
Print 'line two' (,1)
Position (+1)
Print 'line three' (,1)
Position (1)
Print 'line one again' ()
Will print
Line one line one again
Line two
Line three
Compared to: (changing the position (+1) to next-listing)
Position (1)
Print 'line one' (,1)
Next-listing
Print 'line two' (,1)
Next-listing
Print 'line three' (,1)
Position (1)
Print 'line one again' ()
Will print
Line one
Line two
Line threeline one again
The difference becomes apparent when you try to position back to line 1 again.
The next-listing command has "moved" line 1
Both methods have their advantages and disadvantages. I usually use
next-listing as it generally makes the printing logic simple.
But if you ever want to move up the page instead of down you need to use
position ().
Just don't try to mix the two, although it's allowed, it's nearly impossible to
debug a program that isn't printing right when you
have mixed both methods.
Steve.
-----Original Message-----
From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org
[mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On Behalf
Of Manasvini Mahajan
Sent: Monday, 23 July 2007 4:00 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] difference between next-listing and position
Hi All,
Can anyone helo me understand the difference between Positon & Next-listing
Please help
regards
Manaswini
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users