Chris,

I did not see the lab at first - you are correct that it is correct. I was working from the page on the JSoftware web site (http://www.jsoftware.com/jwiki/Studio/Building_Applications) which does have the error. I have updated everything I can find via the package manager to the most up to date versions. Is there some other way to update lab files?

The more I look at it the more I wonder why a tie without a right argument does not cause a syntax error...

I understand about implementation specific differences, but the errors I was referring to were more subtle usage errors. For example, I have seen a number of examples where a file name is specified without jpath in front, and this seems to confuse the name resolution routines on Windows boxes.

Tom

Chris Burke wrote:
List wrote:
In an effort to get some level of familiarity with J I am working
through a number of the excellent examples and essays.

I notice that a number of them have some relatively minor problems, some
of which seem to be platform dependent, some are potentially minor
syntax problems (which are not always so minor if you are not yet good
with the language).

An example of the latter is in the "Building Applications" lab example. The line

DAT=: 'm' fread jpath '~system\examples\data\sales.dat'`

has a trailing tie which does something I do not understand to DAT - it
does not seem to be a noun or a derived verb anymore.  In particular,
$DAT returns a domain error, while DAT by itself returns what appears to
be a boxed array, although trying to unbox it returns a domain error as
well.  So I have no clue what sort of object DAT has become.  The
statement works correctly, returning an array, if you delete the tie
character.

So, two questions: First, is this the right forum to report such minor
errors?  Second, can anybody explain why that trailing tie character
puts DAT in some odd state?

Yes, this is the correct forum.

I don't see the trailing tie in the lab file, which is

  jpath '~system/extras/labs/system/apps.ijt'

Is it possible that you cut and pasted the line, and inadvertently added
the tie?

Also, if necessary, update to the latest scripts - though I do not
recall seeing this before.

In general, we don't expect syntax errors in the labs, so please report
any you find. There are some obvious platform errors, e.g. if a lab is
specifically designed for Windows, then there is no need to report
problems running under Linux.



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to