vippsupport.xerox.com    Forums  Hop To Forum Categories  - Xerox FF VI Suite Forum-  Hop To Forums  FF VI Suite (VIPP)    IF/ELSE/ENDIF

Moderators: Carlo Sans, jbouche
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Posted
I am cleaning up some code and I have an IF statement for a 3of9 barcode


IF ($$VARpage.)VSUB (1) eq ($$VAR_pgcnt.)VSUB (1) eq and {(0) CODE39 SHL} ELSE
{IF ($$VARpage.)VSUB (2) eq ($$VAR_pgcnt.)VSUB (2) eq and {(0) CODE39 SHL} ELSE
{IF ($$VARpage.)VSUB (3) eq ($$VAR_pgcnt.)VSUB (3) eq and {(0) CODE39 SHL} ELSE
{IF ($$VARpage.)VSUB (4) eq ($$VAR_pgcnt.)VSUB (4) eq and {(0) CODE39 SHL} ELSE
{IF ($$VARpage.)VSUB (5) eq ($$VAR_pgcnt.)VSUB (5) eq and {(0) CODE39 SHL} ELSE {(8) CODE39 SHL}
ENDIF}
ENDIF}
ENDIF}
ENDIF}
ENDIF


Everything works great with it but looking at it long after it was created I am thinking this would be a cleaner way

IF VARpage VAR_pgcnt eq
{(0) CODE39 SHL}
ELSE
{(8) CODE39 SHL}
ENDIF


What do you guys think.
 
Posts: 52 | Location: Baltimore MD | Registered: 27 August 2008Reply With QuoteEdit or Delete MessageReport This Post
Posted Hide Post
It's not 100% equivalent (for instance if VARpage and VAR_pgcnt both equal 6, 7, 8 or 9 it will print 8 in the first case and 0 in the second) but it is probably ok in your context. You know :-)
 
Posts: 1776 | Location: Switzerland | Registered: 04 May 2001Reply With QuoteEdit or Delete MessageReport This Post
Posted Hide Post
Your exactly right. We generally have upto 5 pages per set which is why it only goes to 5. By cleaning it up, we will get the added bonus of accounting for the possibility of more pages per set.
 
Posts: 52 | Location: Baltimore MD | Registered: 27 August 2008Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

    vippsupport.xerox.com    Forums  Hop To Forum Categories  - Xerox FF VI Suite Forum-  Hop To Forums  FF VI Suite (VIPP)    IF/ELSE/ENDIF