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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

read files by postscript

Status
Not open for further replies.

AGlukhov

Technical User
Jan 27, 2011
1
0
0
US
Hello everybody! I'm new to PS.
Please, help.
While running PS file (it actually will be printed) I need to load some text in separate variables from another file (on hard drive).
I actually can read only first line from that file, operator "setfileposition" is not working correctly.

My code is:
___________________________________________
%!
/temp () def
/temp2 () def
/datafile {(c:\\xgfc\\projects\\cb\\number.txt) (r) file} def

datafile
23 string readstring
pop
/temp exch def
(var1:) print temp =

datafile 25 setfileposition
datafile 23 string readstring
pop
/temp2 exch def
(var2:) print temp =
datafile closefile
___________________________________________
the result is:
var1:0111111111111111111111
var2:0111111111111111111111
the same first line from number.txt file...

Can anyone help me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top