No-one seems to have done it, but here's my version of the code.

It's strange, I don't have a problem with CONTINUE and I don't even mind
        IF SOMETHING ELSE THIS = THAT
which a lot of people really hate, but I just HAD to reverse the IF/CASE 
statement order.

SUBROUTINE REXY(RECORD,TEXT)
*
     HERE = 0
     QUOTED = @FALSE
     RECORD = ''
     LOOP
        HERE += 1
        C = TEXT[HERE,1]
     UNTIL C EQ ''
        BEGIN CASE
           CASE QUOTED AND TEXT[HERE,2] EQ '""'
              HERE += 1
           CASE C EQ '"'
              QUOTED = NOT(QUOTED)
              C = ''
           CASE C EQ ',' AND NOT QUOTED
              C = @FM
        END CASE
        RECORD := C
     REPEAT
     RETURN
  END

Regards, Keith

PS: Remember Messrs Stout and Chapman - "Simplicate and add more lightness"

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to