What is a "Field Position Error"

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

What is a "Field Position Error"

Postby ray on Thu May 19, 2016 2:33 pm

Is anybody able to point me to what causes a "FIELD POSITION ERROR".(Error 54)

The error was not occurring with 13.2 and may be related to the changes to ⎕ARBOUT that I have had to make when run under Dyalog 14.1.

The error is occuring on a Raspberry Pi running with out a screen, so is difficult to debug.

Thanks
Ray
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 221
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: What is a "Field Position Error"

Postby Geoff|Dyalog on Fri May 20, 2016 7:42 am

FIELD POSITION ERROR is issued when you try to define a top level ⎕SM field that is off screen.

Given that you are running headless I would guess that your screen dimensions are not as large as when you run in development. Use ⎕SD to find out what has been delivered.

I haven't checked but I think in the case where we can't get any better information we default to 24×80.

Nice to see someone still using ⎕SM. You are an endangered species.
Geoff|Dyalog
 
Posts: 43
Joined: Wed May 13, 2009 12:36 pm

Re: What is a "Field Position Error"

Postby AndyS|Dyalog on Fri May 20, 2016 7:53 am

It's also worth trying to see what ⎕DMX.InternalLocation is set to when the error happens .. that and the full version number of the interpreter that you are using allows us to see where in the source code the error was generated. It's important to tell us the revision number so we can look at the exact source that was used to generate the interpreter that you're using !
User avatar
AndyS|Dyalog
 
Posts: 257
Joined: Tue May 12, 2009 6:06 pm

Re: What is a "Field Position Error"

Postby Geoff|Dyalog on Fri May 20, 2016 8:09 am

Checked. If we cannot go full screen then ⎕SD delivers 0×0.

Lots of reasons why we may not be able to go full screen.

1. If no explicit "+s" is on the command line and we infer from the redirections of stdout and stderr that a terminal is not involved.

2. $TERM is not useful enough to get certain abilities - like how to position the output, clear the screen ...

I have to wonder at the use of ⎕SM when headless.
Geoff|Dyalog
 
Posts: 43
Joined: Wed May 13, 2009 12:36 pm

Re: What is a "Field Position Error"

Postby ray on Mon May 23, 2016 8:30 am

Many thanks for the responses.

I now believe the "Field Position Error" was due to error trapped in my code, causing a long error message being sent to ⎕SM and exceeding the (virtual) screen size. Having fixed my error, ⎕SM is now working fine.

Geoff asked "I have to wonder at the use of ⎕SM when headless." Its a long story...

The Raspberry Pi in question, is mounted in "PiRat Bot" my autonomous robot which is headless (that is does not have a screen).

Assuming WiFi is available, I know that using PUTTY or RIDE could connect to PiRat Bot, but only once a WiFi connection has been made. Making said connection (to an "unknown" WiFi) requires supplying details (such as SSID and Password). Without a screen.... (Sings "There's a hole in my bucket...")

So, I use ⎕SM to provide a "question and answer" facility when on the PI. (Much in the same way we-"Dyadic" used "ASK" on AJ teletype terminals back at RANK in the 1980s.)

"How does this help?" you ask.

"eSpeak" is a text to speech application available under Linux that runs very nicely on the Pi.

All the text sent to ⎕SM, I also convert (via eSpeak) into a WAV file, which I then send (via Bluetooth and A2DP) to a Bluetooth enabled loudspeaker.

In this way, I can hear the menu options offered by PiRat Bot, and then (via a wireless keyboard), enter my response (which is also "spoken" as feedback).

Thus I can run PiRat Bot anywhere with just a Bluetooth connection to my speaker and wireless keyboard. No need for a screen or a WiFi connection to another computer with its own screen.

At startup, PiRat Bot (if it has managed to make a WiFi connection), eSpeak's to me what the IP address in use is. Thus allowing me the option to make use of PUTTY or RIDE.

I am sure there must be an easier way, but this is now all working nicely under Dyalog 14.1,

Thanks again for your help.
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 221
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest