@wread buggy?

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

Posts: 119
Joined: Wed Nov 07, 2012 9:11 am

@wread buggy?

Postby mamo » Fri Apr 12, 2019 8:19 am

Dear Eviews team,

I use Eviews 10 March 2018 build. At least in this version, the command @wread seems to be buggy:

1) @wread encloses lines in quotes which is not wanted, and it does so inconsistently. See example below: lines read from text1.txt are enclosed in double quotes, not so lines read from text2.txt. The double quotes cannot be easily removed by @replace, for instance, because this would also remove those double quotes which have been inserted on purpose in the text file to be read in.

2) @wread seems to skip lines with one single character at the beginning of a row. See text2.txt in the example below

Also, it seems that @wread has not been documented in the off-line help of Eviews.

Best, mamo

Code: Select all

' @wread encloses lines in quotes which is not wanted
if @isobject("txt1") then
   delete txt1
' Generate a text file with some typical SQL code
text txt1
txt1.append Select VAR1 VAR2
txt1.append from MYDB
txt1.append where VAR1 IN (X)
txt1.save text1.txt
string str1 =@wread("text1.txt")
show str1

' @wread is buggy: it skips sinlge characters at the beginning of a line!
if @isobject("txt2") then
   delete txt2
text txt2
txt2.append H
txt2.append W
txt2.append Hello
txt2.append World
txt2.save text2.txt
string str2 =@wread("text2.txt")
show str2

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest