Table entries

Home Forums General Programming Table entries

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #401
    Filch
    Participant
      • Topics: 22
      • Replies: 173
      • Total: 195
      • ★★

      I want two table indexes to equal the same thing. I was trying

      [code:32dqvvac]
      a[0,1] = "1280 Bars"
      [/code:32dqvvac]

      I also tried
      [code:32dqvvac]
      a[0,1] = "1280 Bars", "1280 Bars"
      [/code:32dqvvac]

      Is there a way for me to get this to work in setting table values, or am I going to have to enter each one individually?

      Blofeld Index :

      Index Description


      0..1 1280 bars
      2..3 1152 bars
      4..5 1024 bars
      6..7 896 bars
      8..9 768 bars
      10..11 640 bars
      12..13 576 bars

      etc.

      #3085
      netchose
      Participant
        • Topics: 15
        • Replies: 70
        • Total: 85

        i think this should work

        a={ 1280,1280,1152,1152,1024,1024,896,896}

        #3086
        Filch
        Participant
          • Topics: 22
          • Replies: 173
          • Total: 195
          • ★★

          Yes, that’s it. So obvious now. Plus I found it in the LUA Programming book after reading the chapter on tables :-p

          Thanks <img decoding=” title=”Smile” />

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The forum ‘Programming’ is closed to new topics and replies.
        There is currently 0 users and 78 guests online
        No users are currently active
        Forum Statistics
        Threads: 2,495, Posts: 17,374, Members: 77,605
        Most users ever online was 12 on January 22, 2019 3:47 pm
        Ctrlr