#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2016
    Posts
    2
    Rep Power
    0

    Unhappy array split issue 0 TO xzcount


    hi i want to be able to control the count for an array split based on formula

    i need to be able to show 10 records so i can use FOR xz = 0 TO 9 which works, BUT if there is not 10 records
    i want to be able to change the 9 to a variable

    i tried the following but it wont allow my to use 0 TO xzcount

    Code:
    aSorted = fnSort(ArrGigs, 1)
     fncount = c + cc + 1
     xzcount = 10
    	 if xzcount > fncount then
                 xzcount  = fncount
              else
                  xzcount = xzcount
             end if 
    
    FOR xz = 0 TO xzcount
            ArrSplit = SPLIT(aSorted(xz), "|")
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2016
    Posts
    2
    Rep Power
    0
    i may have worked it out by using the cstr

    Code:
    fncount = c + cc       
    xzcount = 20
    
    if xzcount > fncount then
    xzcount  = fncount
    else
    xzcount = xzcount
    end if 
    									     
    FOR xz = 0 TO cstr(xzcount)
  4. #3
  5. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,553
    Rep Power
    4549
    Thanks for posting your solution
    ======
    Doug G
    ======
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton

IMN logo majestic logo threadwatch logo seochat tools logo