Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TCL array question 1

Status
Not open for further replies.

robojeff

Technical User
Dec 5, 2008
220
US
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
 
Hi

Certainly. In Tcl even the line comments can be continuated.
Code:
[b][black]set[/black][/b] ch [COLOR=teal][[/color][b][black]list[/black][/b] [teal]\[/teal]
    [COLOR=#993399]8[/color] [COLOR=#993399]25[/color] [COLOR=#993399]13[/color] [COLOR=#993399]21[/color] [COLOR=#993399]127[/color] [COLOR=#993399]10[/color] [COLOR=#993399]18[/color] [COLOR=#993399]19[/color] [COLOR=#993399]44[/color] [COLOR=#993399]29[/color] [COLOR=#993399]27[/color] [COLOR=#993399]120[/color] [COLOR=#993399]35[/color] [COLOR=#993399]124[/color] [COLOR=#993399]126[/color] [COLOR=#993399]41[/color] [teal]\[/teal]
    [COLOR=#993399]6[/color] [COLOR=#993399]12[/color] [COLOR=#993399]11[/color] [COLOR=#993399]16[/color] [COLOR=#993399]15[/color] [COLOR=#993399]42[/color] [COLOR=#993399]22[/color] [COLOR=#993399]26[/color] [COLOR=#993399]30[/color] [COLOR=#993399]20[/color] [COLOR=#993399]85[/color] [COLOR=#993399]34[/color] [COLOR=#993399]39[/color] [COLOR=#993399]121[/color] [COLOR=#993399]43[/color] [COLOR=#993399]40[/color] [teal]\[/teal]
    [COLOR=#993399]47[/color] [COLOR=#993399]61[/color] [COLOR=#993399]51[/color] [COLOR=#993399]58[/color] [COLOR=#993399]60[/color] [COLOR=#993399]48[/color] [COLOR=#993399]55[/color] [COLOR=#993399]56[/color] [COLOR=#993399]84[/color] [COLOR=#993399]64[/color] [COLOR=#993399]63[/color] [COLOR=#993399]68[/color] [COLOR=#993399]70[/color] [COLOR=#993399]73[/color] [COLOR=#993399]74[/color] [COLOR=#993399]79[/color] [teal]\[/teal]
    [COLOR=#993399]46[/color] [COLOR=#993399]50[/color] [COLOR=#993399]49[/color] [COLOR=#993399]53[/color] [COLOR=#993399]52[/color] [COLOR=#993399]81[/color] [COLOR=#993399]59[/color] [COLOR=#993399]62[/color] [COLOR=#993399]65[/color] [COLOR=#993399]57[/color] [COLOR=#993399]67[/color] [COLOR=#993399]69[/color] [COLOR=#993399]76[/color] [COLOR=#993399]71[/color] [COLOR=#993399]83[/color] [COLOR=#993399]77[/color]
[teal]][/teal]


Feherke.
feherke.ga
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top