SDerrick
6th December 2005, 15:28
Hello,

I've been trying to use the text.to.buf function, mainly with the help of previous threads. The background is that I am trying to write our text to individual lines of an ascii file. I also need to check for the < sign as the first character to bypass the line.

On compiling I get an error: Unresolved Reference to text.to.buf but I am just using the same format as other examples on this site. Can anyone give me a hint as to where I'm going wrong. Here's the code:

text.seqno = 0
if tdsls041.txta <> 0 then
nr.of.lines = text.to.buf("tdsls041.txta",language$, 40, buffer)
for i = 1 to nr.of.lines
txt.line = strip$(buffer(1,i))
first.char = txt.line(1;1)
if first.char <> "<" then
text.seqno = text.seqno + 1
opstring = "4" & tdsls040.refa & sprintf$("%03d", text.seqno)
opstring = opstring & strip$(buffer(1,i))
ret = seq.puts(opstring, filepointer)
opstring = ""
endif
endfor
endif

Thanks

mark_h
6th December 2005, 15:45
Include this in the code #include <bic_text>.

SDerrick
6th December 2005, 18:11
Thank you very much, that has done the job nicely.

Regards

Simon