sumup fractions of itle for a inch project

<STRING> '9 7/8'

<STRING> '8 3/8'

<STRING> '3 1/2'

<STRING> '3/4'

<STRING> '5'4 9/16'

i extracted itle where these are coming in string format.

is there is a way to sum these to get final value, might convert into real and sumup.

i need final sum value as feet fractions

!qty[!i] = !ref.itle.value().string(!format)
!b = !qty[!i].real()
handle (2,441)
endhandle
q var !b

added handle but it is skipping values.

Undefined

Undefined

Undefined

<REAL> 0.75

<REAL> 0.75

Parents Reply
  • !!RealFMT = object FORMAT()
    !!RealFMT.DIMENSION = 'L'
    !!RealFMT.UNITS = 'FINCH'
    !!RealFMT.FRACTION = TRUE
    !!RealFMT.DENOMINATOR = 4
    !!RealFMT.ZEROS = FALS
    !a = !!collectallfor('pipe','',!!ce)
    do !s values !a
    !tubis = !!collectallfor('BRAN MEM',|TYPE EQ 'TUBI'|,!s)
    !tubelength = 0
    do !tubi values !tubis
    !tubelength = !tubelength + !tubi.itle
    !tubelength1 = !tubelength.value().string(!!RealFMT)
    enddo
    enddo

Children
No Data