![]() |
|
||||||||||||
|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
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. |
|||
|
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 :-)
|
||||
|
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.
|
||||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|

