Posted by Bob A on September 24, 2015 at 09:37:28:
Was attempting to extract an indication of the SGN of a set of fields (-/0/+) seems to have worked correctly for all values but 0.01.... in this case it seems like it gets truncated (??) to 0.0 and then returns "0" not "+"
the workaround is OK for now to get me over the hump.... but I'd like to know if you can re-produce this problem
Thanx
Bob "A"
LENGTH 10.2 & LOCAL TLY432.NBR.1
: : :
LENGTH 10.2 & LOCAL TLY432.NBR.8
!==================
SET.TLY432.NBR.SGN:
!==================
! Value SGN 2+SGN
! LT 0 -1 1
! EQ 0 0 2
! GT 0 +1 3
!---------------------
.ifndef SGN.FUNCTION.OK
TLY432.NBR.1.SGN$ = SUB("-0+",(2+SGN(TLY432.NBR.1)),1)
TLY432.NBR.2.SGN$ = SUB("-0+",(2+SGN(TLY432.NBR.2)),1)
TLY432.NBR.3.SGN$ = SUB("-0+",(2+SGN(TLY432.NBR.3)),1)
TLY432.NBR.4.SGN$ = SUB("-0+",(2+SGN(TLY432.NBR.4)),1)
TLY432.NBR.5.SGN$ = SUB("-0+",(2+SGN(TLY432.NBR.5)),1)
TLY432.NBR.6.SGN$ = SUB("-0+",(2+SGN(TLY432.NBR.6)),1)
TLY432.NBR.7.SGN$ = SUB("-0+",(2+SGN(TLY432.NBR.7)),1)
TLY432.NBR.8.SGN$ = SUB("-0+",(2+SGN(TLY432.NBR.8)),1)
.else
IF TLY432.NBR.1 LT 0 THEN TLY432.NBR.1.SGN$ = "-"
IF TLY432.NBR.2 LT 0 THEN TLY432.NBR.2.SGN$ = "-"
IF TLY432.NBR.3 LT 0 THEN TLY432.NBR.3.SGN$ = "-"
IF TLY432.NBR.4 LT 0 THEN TLY432.NBR.4.SGN$ = "-"
IF TLY432.NBR.5 LT 0 THEN TLY432.NBR.5.SGN$ = "-"
IF TLY432.NBR.6 LT 0 THEN TLY432.NBR.6.SGN$ = "-"
IF TLY432.NBR.7 LT 0 THEN TLY432.NBR.7.SGN$ = "-"
IF TLY432.NBR.8 LT 0 THEN TLY432.NBR.8.SGN$ = "-"
IF TLY432.NBR.1 EQ 0 THEN TLY432.NBR.1.SGN$ = "0"
IF TLY432.NBR.2 EQ 0 THEN TLY432.NBR.2.SGN$ = "0"
IF TLY432.NBR.3 EQ 0 THEN TLY432.NBR.3.SGN$ = "0"
IF TLY432.NBR.4 EQ 0 THEN TLY432.NBR.4.SGN$ = "0"
IF TLY432.NBR.5 EQ 0 THEN TLY432.NBR.5.SGN$ = "0"
IF TLY432.NBR.6 EQ 0 THEN TLY432.NBR.6.SGN$ = "0"
IF TLY432.NBR.7 EQ 0 THEN TLY432.NBR.7.SGN$ = "0"
IF TLY432.NBR.8 EQ 0 THEN TLY432.NBR.8.SGN$ = "0"
IF TLY432.NBR.1 GT 0 THEN TLY432.NBR.1.SGN$ = "+"
IF TLY432.NBR.2 GT 0 THEN TLY432.NBR.2.SGN$ = "+"
IF TLY432.NBR.3 GT 0 THEN TLY432.NBR.3.SGN$ = "+"
IF TLY432.NBR.4 GT 0 THEN TLY432.NBR.4.SGN$ = "+"
IF TLY432.NBR.5 GT 0 THEN TLY432.NBR.5.SGN$ = "+"
IF TLY432.NBR.6 GT 0 THEN TLY432.NBR.6.SGN$ = "+"
IF TLY432.NBR.7 GT 0 THEN TLY432.NBR.7.SGN$ = "+"
IF TLY432.NBR.8 GT 0 THEN TLY432.NBR.8.SGN$ = "+"
.endif
RETURN
Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.