Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8820

Re: Line Numbers in Files

From Ulrich Arndt <ulrich.arndt@data2knowledge.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Line Numbers in Files
Date 2012-03-01 10:41 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jinjpe$d4k$1@smc.vnet.net> (permalink)
References <201202291224.HAA28378@smc.vnet.net>

Show all headers | View raw


this might work for you

OpenRead, Skip and Read.

Example
table = RandomInteger[1000, {1000, 2}];
Export["./test.csv", table, "CSV"]
table[[123]]
str = OpenRead["./test.csv"]
Skip[str, Record, 122]
Read[str, Record]

Ulrich

Am 29.02.2012 um 13:24 schr
ieb Don:

> I am getting a warning
> regarding one of the packages I have
> written which says the following:
> 
> Syntax::com : 
>  Warning : Comma encountered with no adjacent expression. The
>     expression will be treated as Null.  (line 2333 of
>         "AFin6`UserFuncs`XFdData1`").
> 
> Is there a way to go to the 
> a specific line number in a file?  Line 2333 above
> is impossible to locate otherwise.  
> With all  the amazing functionality in Mathematica,
> sometimes extremely simple things that
> are immediately obvious in other languages  turn out
> to be very difficult to find out how to do.  
> 
> Thank you.
> Don
> 

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Line Numbers in Files Ulrich Arndt <ulrich.arndt@data2knowledge.de> - 2012-03-01 10:41 +0000

csiph-web