INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

TCL array question

TCL array question

(OP)
I am new to TCL and have a question about arrays...

I have the following arrays but would like to make this one array of 64 numbers.

set ch0_31 [list 8 25 13 21 127 10 18 19 44 29 27 120 35 124 126 41]
set ch31_63 [list 6 12 11 16 15 42 22 26 30 20 85 34 39 121 43 40]
set ch63_95 [list 47 61 51 58 60 48 55 56 84 64 63 68 70 73 74 79]
set ch96_127 [list 46 50 49 53 52 81 59 62 65 57 67 69 76 71 83 77]

Because the line would most likely wrap to the next line, do I need to have some
of continuation character to place this on more than one line and to make it easier to read
instead of the following?

set ch [list 8 25 13 21 127 10 18 19 44 29 27 120 35 124 126 41 6 12 11 16 15 42 22 26 30 20 85 34 39 121 43 40 47 61 51 58 60 48 55 56 84 64 63 68 70 73 74 79 46 50 49 53 52 81 59 62 65 57 67 69 76 71 83 77]

Thanks

RE: TCL array question

Hi

Certainly. In Tcl even the line comments can be continuated.

CODE --> Tcl

set ch [list \
    8 25 13 21 127 10 18 19 44 29 27 120 35 124 126 41 \
    6 12 11 16 15 42 22 26 30 20 85 34 39 121 43 40 \
    47 61 51 58 60 48 55 56 84 64 63 68 70 73 74 79 \
    46 50 49 53 52 81 59 62 65 57 67 69 76 71 83 77
] 

Feherke.
feherke.ga

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close