help a newbie programmer tcl

Prompt please where the error occurred.
text.txt obtained by ls-lah> text.txt

proc file_to_mas {name_file} {
set fileid [open $name_file r+]
seek $fileid 0 start
global mas
set mas(0) 1
for {set i 0} {![eof $fileid]} {incr i} {
gets $fileid mas(i);
puts $mas(i) }
close $fileid;}
file_to_mas {text.txt}
puts "\n...................................\n"
puts $mas(0)
puts $mas(1) ;#why mas (0) and mas(1) Local?

proc file_to_mas {name_file} {
        set fileid [open $name_file r+]
        seek $fileid 0 start
        global mas
        set mas(0) 1
        for {set i 0} {![eof $fileid]} {incr i} {
                gets $fileid mas($i)
                puts $mas($i)
        }
        close $fileid
}

file_to_mas {text.txt}
puts "\n...................................\n"
puts $mas(0)
puts $mas(1) ;#why mas (0) and mas(1) Local?

Thank you, cjcox. Is there a special forum TCL?