Sponsored Content
Full Discussion: help a newbie programmer tcl
Top Forums Shell Programming and Scripting help a newbie programmer tcl Post 302342407 by augur_aen on Sunday 9th of August 2009 01:46:38 PM
Old 08-09-2009
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?
 

7 More Discussions You Might Find Interesting

1. SCO

Need Sco Programmer

Need programmer to work on 8-12 month project near Dallas, Texas or can telecommute to make changes to SCO File Pro 32 UNIX software that was converted to DOS.....Can't find anything as good as what we had in any other OS. Brent Davis brentd@texasspecialty.com (0 Replies)
Discussion started by: brentpdavis
0 Replies

2. Programming

do you think you are a real c programmer then lets see..

here is a code which sends and receives sms through a serial port. the problem is that its givin segmentation fault. it first sets the file discriptor and the initialises the modem by using AT commands. there are two threads for reading and writing . rest the code is simple you'll get it. user has... (1 Reply)
Discussion started by: harsh_it
1 Replies

3. Programming

do you think you are a real c programmer then lets see..

#include<stdio.h> #include<unistd.h> #include<fcntl.h> #include<termios.h> #include<string.h> #include<errno.h> #include<sys/types.h> #include<sys/select.h> #include<string.h> #include<sys/time.h> void *thread_function(void *arg); char quit='\0';/* this tends to terminate the read... (2 Replies)
Discussion started by: harsh_it
2 Replies

4. Linux

Starting Linux for a Programmer

Hi all I am application Programmer. In my college(2 yrs back) i have learnt Unix i.e commads, shell scripts, Filesystem,I reffered to a book by "Sumitabha Das". I want to learn Linux. But i cant understand where should i start from and which book to refer to. Most of the books these days eg.... (2 Replies)
Discussion started by: FullMetal
2 Replies

5. UNIX for Dummies Questions & Answers

starting programmer

Hi to all, I'm started to write some very simple loops in bash an i'm getting this error -bash: (the example is just to show when the error appeared) the code was x=o while do echo "hello" x++ done (5 Replies)
Discussion started by: gogodash
5 Replies

6. What is on Your Mind?

A Programmer is .....

https://www.unix.com/picture.php?albumid=112&pictureid=603 (7 Replies)
Discussion started by: Neo
7 Replies

7. Programming

First time programmer needs Help with Makefiles

I am trying to practice to create Makefiles. The goal is to create a makefile such that if a change is made to any of the source code files, the project can be rebuilt by typing make at the command line. I have the following files: ac.cc: has include ac.h and pg.h fr.cc: has main... (8 Replies)
Discussion started by: pintu1228
8 Replies
KLDNEXT(2)                                                    BSD System Calls Manual                                                   KLDNEXT(2)

NAME
kldnext -- return the fileid of the next kld file LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/param.h> #include <sys/linker.h> int kldnext(int fileid); DESCRIPTION
The kldnext() system call returns the fileid of the next kld file (that is, the one after fileid) or 0 if fileid is the last file loaded. To get the fileid of the first kld file, pass fileid of 0 to kldnext(). RETURN VALUES
The kldnext() system call returns the fileid of the next kld file or 0 if successful. Otherwise kldnext() returns the value -1 and sets the global variable errno to indicate the error. ERRORS
The only error set by kldnext() is ENOENT, which is set when fileid refers to a kld file that does not exist (is not loaded). SEE ALSO
kldfind(2), kldfirstmod(2), kldload(2), kldstat(2), kldsym(2), kldunload(2), modfind(2), modfnext(2), modnext(2), modstat(2), kld(4), kldstat(8) HISTORY
The kld interface first appeared in FreeBSD 3.0. BSD February 22, 2006 BSD
All times are GMT -4. The time now is 06:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy