Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing fixed length string array to function
#3
Thanks Steve,
I tried it and it screwed up all the other places where I used variable strings. It's just down to the limits of my function I guess.
I replaced it with the clumsy solution which worked fine. Chalk one up to experience.

    REDIM ss$(8)
    SELECT CASE specindex
        CASE IS > 50
            ss$(0) = "1234567"
            ss$(1) = "1:Ia": ss$(2) = "2:Ib": ss$(3) = "3:II": ss$(4) = "4:III"
            ss$(5) = "5:V": ss$(6) = "6:VI": ss$(7) = "7Big Grin"
            REDIM _PRESERVE ss$(UBOUND(ss$) - 1)
        CASE IS <= 34
            ss$(0) = "1234567"
            ss$(1) = "1:Ia": ss$(2) = "2:Ib": ss$(3) = "3:II": ss$(4) = "4:III"
            ss$(5) = "5:IV": ss$(6) = "6:V": ss$(7) = "8Big Grin"
            REDIM _PRESERVE ss$(UBOUND(ss$) - 1)
        CASE ELSE
            ss$(0) = "12345678"
            ss$(1) = "1:Ia": ss$(2) = "2:Ib": ss$(3) = "3:II": ss$(4) = "4:III"
            ss$(5) = "5:IV": ss$(6) = "6:V": ss$(7) = "7:VI": ss$(8) = "8Big Grin"
    END SELECT
    hvns(var).siz = _TRIM$(MID$(ss$(Chs_Key_Button(_TRIM$(ss$(0)), "h", 540, UBOUND(ss$), 50, 50, 5, scrw / 2, ss$())), 3))

At least my code seems much happier Big Grin
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
Reply


Messages In This Thread
RE: Passing fixed length string array to function - by OldMoses - 08-25-2022, 01:10 AM



Users browsing this thread: 9 Guest(s)