HDTenEightyP/NetNews huggingface dataset:
From: berend@contrast.wlink.nl (Berend de Boer)
Newsgroups: comp.lang.pascal
Subject: Turbo Vision Keys?
Date: Fri, 18 Dec 1992 08:06:54

Dean Davidson wrote in a message to All:


 DD> I also prefer to use the ENTER to move to the next field. 
 DD> My user interface routines that I use, incorporate this
 DD> feature.

 DD> You mention the CUA standard.

 DD> What is this? Where is it used? How widely is it used?

What are they, you can better say. There are three CUA's, the last
depending on the previous. The CUA87, CUA89 and the CUA91 Standard. CUA
stands for Common User Acces, defined by IBM.
  CUA87 was directed to computer independence. A 3270 should behave like
your IBM PC. Let's take for example the ENTER and TAB key. When running
a 3270 emulator on our LAN connected to a CICS mainframe, the TAB moves
to the next field, ENTER accepts the screen. Just like your TVision
programs (if you follow standard behaviour).
  CUA89 was graphical oriented. Menubars, dialogboxes etc. were defined.
TVision follows CUA89.
  CUA91 is the Workplace Model. Look for OS/2 to see how this works. You
are working with objects, moving, dragging them and applying operations
on them. In my opinion CUA91 cannot be implemented in character mode
TVision. You need graphics, icons etc.

 DD> I'm all for using a standard user interface, but I was not
 DD> aware that any standard existed.

CUA is used by all (almost) IBM programs, Windows, TVision and lots of
other programs.

 DD> More information would be appreciated on the CUA standard,
 DD> or any other standards that do exist.

Maybe this will help you. If you need the exact references to the CUA??
document, send me a email and I will look them up.


Groetjes,

Berend. (-:
fido: 2:281/527.23
email: berend@contrast.wlink.nl
From: jarmo.aho@compart.fi (Jarmo Aho) 
Newsgroups: comp.lang.pascal
Subject: getimage
Date: 12 Dec 92 10:55:00 GMT
Distribution: world
Organization: ComPart BBS, Helsinki-Finland, +358 0 506 3329 (14 lines V.32bis)
Reply-To: jarmo.aho@compart.fi (Jarmo Aho) 


DJ>        I am busy with a small game woith some simple graphics.
DJ>        I found out what the format is of a (TP) getimage BMP but I don't
DJ>        know what the meaning is of the last word. Could anyone tell me ?


  If yoy are talking about 16 color mode, then that last word is
  meaningless. I have found that ImageSize doesn't compute imagesize
  quite correctly. It gives two bytes (that last word) too much.
  That is not very serious, but in 256 color graphics mode it's
  worse. For example ImageSize(0,0,30,30) gives 998. Correct value
  is 965.

  This should work:

  function ImageSize(x1, y1, x2, y2 : integer) : longint;
  begin
    if GetMaxColor = 255 then
      ImageSize := longint(Abs(x2-x1)+1) * longint(Abs(y2-y1)+1) + 4
    else if GetMaxColor = 15 then
      ImageSize := ( ( (Abs(x2-x1)+1) + 7) shr 3) * 4 * (Abs(y2-y1)+1) + 4
    else
      ImageSize := Graph.ImageSize(x1,y1,x2,y2);
  end;

                                                                                                  
Newsgroups: comp.lang.pascal
From: bbs.playboy@tsoft.sf-bay.org (Tony Yin)
Subject: VGA Font scrolling
Organization: The TSoft BBS and Public Access Unix, +1 415 969 8238
Date: Sat, 12 Dec 1992 07:41:25 GMT

Does anyone know how to scroll VGA fonts across the screen in 320X200 
mode????????????????


--
Tony Yin (bbs.playboy@tsoft.sf-bay.org)
From: po87553@cs.tut.fi (Pasi 'Albert' Ojala)
Newsgroups: comp.lang.pascal
Subject: tvision context-sensitive Help
Date: 16 Dec 1992 21:14:11 GMT
Organization: Tampere University of Technology
Distribution: world
NNTP-Posting-Host: kaarne.cs.tut.fi

This is a forwarded message from: Seppo Suutarla                
                                                                
Hi, I'm a new Tvision user and I've written a small program with
bp7.0 and I'd like to get a similar help function as bp7.0 have.
                                                                
I've done it so far that I compiled my own help file with       
tvhc and linked it to my program. My program works just as it   
was supposed to, but when function key F1 is pressed, a small   
help window shows up and the contents of it blinks (only the    
help window texts). The background color of the help window     
is red.                                                         
                                                                
I've taken the following statements from tvdemo.pas:            
                                                                
-    {$X+,S-                                                   
-    {$M 16384,8192,655360                                     
-    function CalcHelpName: PathStr;                            
-    procedure TTVDemo.GetEvent(var Event: TEvent);             
                                                                
What else I have to consider?                                   
-Seppo

-- 
 Pasi Ojala - The Other Author of AXsh    po87553@cs.tut.fi albert@cc.tut.fi
 Pasbox / 931-3710024 / 21-06 / v32/v42/v42bis/mnp5
Newsgroups:   comp.lang.apl
From:         pow@ipsa@ipsaint.ipsa.reuter.COM (Remote Addressee:)
Subject:      Enhancing J file capabilities
Reply-To:     pow@ipsa@ipsaint.ipsa.reuter.COM (Remote Addressee:)
Organization: Reuters Information Services (Canada)
Date:         17 Dec 92 17:00:05 UT


-----------Message forwarded from IPSA Mailbox-------------


no. 6839150 filed 16.56.53  thu 17 dec 1992
from pow@ipsa
to   uclapl
subj Enhancing J file capabilities

@transferred from ipsa  no. 5452748 filed 16.56.43  thu 17 dec 1992

I have almost finished some J verbs to provide access to files by key
value. These might be what you're looking for. Usage is as follows.

Create <'filename'         Creates a file and initializes its directory.
(key;value)Put <'filename' Stores value in filename by key, any noun.
key Get <'filename'        Returns value stored in filename under key.
Dir <'filename'            Returns a directory showing the file's keys and
                           where they are located in filename.

                           There will be a few other verbs, e.g. Find
                           and Squeeze.

These verbs take care of growing replaces. If a Put is of a new key, the
value is padded and appended to the end of the file. If the Put is of an
existing key, it goes back in the existing slot, if it fits. If it doesn't
fit, the value is padded and appended.

The representation of J objects in a file uses 5!:5. This means that keys
can be more than the usual character strings. You can quite happily have
i.4 10 as a key. Precision of representation depends entirely on 5!:5.
Values are recreated with ". .

For your particular example, you could:

Create f=.<'NFL'
Team=. whatever...
('Miami';Team)Put f

Then later,

Team =. 'Miami' Get f
Team =. Team plus some new information
('Miami';Team)Put f

This is all a little fragile today, but if it's of interest, I'd be happy
to improve it and make it available.

Mike Powell



-----------------------------------------------------------
This posting is forwarded from an internal Reuters mailbox.
No statement or opinion contained herein should be taken as
being Reuters policy, or even as being approved by Reuters,
in any way.
Newsgroups: comp.lang.apl
From: pmoore@cix.compulink.co.uk (Paul Moore)
Subject: A verb to trim spaces from a string
Reply-To: pmoore@cix.compulink.co.uk
Date: Sat, 12 Dec 1992 18:19:00 +0000


I am looking for a J verb which will take a string and remove all
leading and trailing whitespace from it. I have tried various
approaches, and I really cannot believe it is as hard as I'm finding
it...

Specifically, I'm after 3 verbs

    c ltrim str     Remove all occurrences of character c from
                    the start of str.
    c rtrim str     Remove all occurrences of character c from
                    the end of str.
    c trim str      Remove all occurrences of character c from
                    both ends of str.

For the monadic cases, assume c is ' '.

I know trim is just a combination of ltrim and rtrim, but I am having
trouble working out what combination. I can't get both the monadic and
dyadic cases to work as I want (none of hook, & or @ seem quite right).
Besides, using a variant of the ltrim/rtrim algorithms for trim may be
more efficient...

I have tried a lot of approaches. Take monadic ltrim as an example. My
first thought was a direct translation of a C style, using explicit
definition. Using $. to build loops, run along str looking for the first
non-blank. Then use drop. This works, but it isn't very J-like, and more
problematic, it does not seem to be particularly easy to generalise.

I then thought of a functional-programming approach, using $: to
recursively drop the first character while it is a space. Again, not
very J-like, and hard to generalise. Also, it is still quite hard to
convert the explicit version to a tacit one.

A more APL-like approach would seem to be to build a boolean array with
0's for the leading spaces and 1's for the string to be retained, and
then use copy. This is the equivalent of the APL boolean reduction. This
is much easier to generalise (just change the boolean array you use),
but I can't see an easy way to build the boolean array.

It seems to me that J ought to be able to do this sort of job very
simply. The fact that I am having so much trouble seems to indicate that
I have yet to really "understand" J.

If anybody can provide me with some help, I would appreciate it. Working
versions of the specified verbs would be nice, but even better would be
pointers on how I should be THINKING about this problem, in order to
reach a decent solution.

Thanks in advance,

Paul Moore.

------------------------------------------------------------------------
Paul Moore (pmoore@cix.compulink.co.uk)   |
------------------------------------------------------------------------
"You're talking about a pope who can't find a chicken in a cave."
------------------------------------------------------------------------
From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Re: Enhancing J file capabilities 
Organization: San Francisco State University
Distribution: NA
Date: Thu, 17 Dec 1992 02:27:57 GMT

Its *Mike Powell* thats looking into this.
I confused the name. (I regret the error.)

E.
Newsgroups: comp.lang.apl
From: cholland@dorsai.com (Cary Holland)
Subject: Whither APL News?
Organization: The Dorsai Embassy +1.718.729.5018
X-Newsreader: Tin 1.1 PL4
Date: Thu, 10 Dec 1992 21:08:54 GMT

Anyone know what happened to APL News since Ed Cherlin took over as publisher
from Springer-Verlag?
Newsgroups: comp.lang.apl
From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Enhancing J file capabilities 
Organization: San Francisco State University
Distribution: NA
Date: Sun, 13 Dec 1992 07:00:25 GMT

   Suppose I am writting an application with the following data:

   a =. 'Montana';'Simms';'Elway'
   b =. 'Tyler';'Metcalf';'Thomas'
   c =. 'Rice';'Lofton';'Duper'
   d =. 'Young';'Kreig';'Everett'

   With the verbs:

   append =. '((10{a.) ,~ 5!:3 <'''',y.,'''') 1!:3 < x.':11
   write =. '((10{a.) ,~ 5!:3 <'''',y.,'''') 1!:2 < x.':11
   read  =. >@(<&}:;.2)@(1!:1&<)

   Using the following instructions: 

   'ftblplyrs' write 'a'

   'ftblplyrs' append 'b'

   'ftblplyrs' append 'c'

   So that: 

   read 'ftblplyrs'
52xba 1 3 14c- 1 7 Montana12c- 1 5 Simms12c- 1 5 Elway 
53xbb 1 3 12c- 1 5 Tyler14c- 1 7 Metcalf13c- 1 6 Thomas
50xbc 1 3 11c- 1 4 Rice13c- 1 6 Lofton12c- 1 5 Duper   
   
   Now, once this information is stored in the file, the user
   logs out and then back in again, and at this point is
   prompted for for a file name. In this instance he selects
   "ftblplyrs" so he can access and revise information in the file.

   Basically, I'd like to have a set of programs,
   perferably J verbs, which would let me write an
   application like I've described. That is,
   providing the file capabilities of Manugistics mainframe 
   (and for what I know PC) APL.

   If (miraculously) anyone has a set of programs which does
   this and is willing to share it that would be great!

   As I imagine this is not the case, if I set out to program
   this myself, I'd like some pointers. Is the best
   way to approach it to write it C++? (If so, is there 
   publically available application whose code I might reuse
   or study?) Or can I use existing J verbs, keying on
   the line feeds and appending an "erase to end of line" character
   after the end of each revision?   ( Obviously file
   locking capabilities would have to be coded in C++.)

   As an aside, can the "write", shown above be written
   so the noun variables do not have to be passed by name?

   Thanks!

   Emmett.
Newsgroups: comp.lang.apl
From: hui@fid.morgan.com (Roger Hui)
Subject: Re: A verb to trim spaces from a string
Organization: Morgan Stanley & Co., New York, NY
Date: Sat, 12 Dec 1992 21:18:16 GMT

Paul Moore writes:

>I am looking for a J verb which will take a string and remove all
>leading and trailing whitespace from it. I have tried various
>approaches, and I really cannot believe it is as hard as I'm finding
>it...
>
>Specifically, I'm after 3 verbs
>
>    c ltrim str     Remove all occurrences of character c from
>                    the start of str.
>    c rtrim str     Remove all occurrences of character c from
>                    the end of str.
>    c trim str      Remove all occurrences of character c from
>                    both ends of str.
>
>For the monadic cases, assume c is ' '.

ltrim =. ' '&$: : (+./\ @:~: # ])
rtrim =. ' '&$: : (+./\.@:~: # ])
trim  =. ' '&$: : ((+./\ *. +./\.)@:~: # ])
______________

Roger Hui

Newsgroups: comp.lang.apl
From: hui@fid.morgan.com (Roger Hui)
Subject: Re: Please send me your J code
Organization: Morgan Stanley & Co., New York, NY
Date: Sun, 13 Dec 1992 17:41:51 GMT

Martin Neitzel writes:

> NAME
>     moo - guessing game
>
> SYNOPSIS
>     /usr/games/moo
>
> DESCRIPTION
>     moo is a guessing game imported from England.  The  computer
>     picks  a  number consisting of four distinct decimal digits.
>     The player guesses four distinct digits being scored on each
>     guess.   A  ``cow'' is a correct digit in an incorrect posi-
>     tion.  A ``bull'' is a correct digit in a correct  position.
>     The  game  continues  until the player guesses the number (a
>     score of four bulls).

read  =. 1!:1
pr    =. 1!:2&2

univ  =. (*./@(~:"1) # ])@(#: i.@(*/))

score =. ; read@1:@pr@":
guess =. ?@# { ]
bull  =. +/@('b'&=)@(>@{:@[) = >@{.@[ +/@(="1) ]
bc    =. #@(>@{:@[) = ] +/@e."1 >@{.@[
prune =. (bull *. bc) # ]

s0    =. pr@('no choices left'&[)
s1    =. pr@('one choice left; it must be '&,)@":@,
sn    =. pr@(,&' choices left')@":@#
state =. s0`s1`sn@.(0 1&i.@#)

moo   =. ([state)@(score@guess prune ])^:(1&<@#) @ univ

The program above plays the guesser in the game of moo.
The algorithm was described to me in 1976 by W.F. Appleyard
of I.P. Sharp Associates, Calgary:  A universe of remaining
choices is kept.  At each round, the computer selects a
guess at random from the universe, then prunes the universe
according to the guess and its score of bulls and cows.

The definitions are divided into groups:

"read 1" reads from the keyboard.  "pr" prints the string
argument on the screen.

"univ" generates the universe of choices, given an integer
list of the upper limits for each position.  e.g. univ 4$10
or univ 10 11 12.

"score" displays an integer list on the screen, solicits
a score from the keyboard, and returns a list of the score 
and the guess, individually boxed.  "guess" selects a guess at 
random from the universe.  "bull" scores each choice in the 
universe regarding bulls; "bc" regarding bulls _and_ cows.  
"prune" discards choices inconsistent with the guess and 
its score.

"state" shows the current size of the universe.

"moo" plays the guesser in the game of moo.  The argument
is an integer list of the upper limits for each position.
(e.g. moo 4$10 would be the game as described in the man page.)
In each round, "moo"
. checks that the universe contains more than one choice;
. selects a guess at random and solicits its score;
. prunes the universe; and
. displays the state.

--------------
Roger Hui
Newsgroups: comp.lang.apl
From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Re: Enhancing J file capabilities 
Organization: San Francisco State University
Distribution: NA
Date: Wed, 16 Dec 1992 23:12:41 GMT

I received the following message addressing my post on J
file capabilities.  Since the message was posted through
an intermediary, it was suggested that I could respond 
either via email or post.  Since I wouldn't want to
take too much of Mike Porter's time by having him
polish code on my part, I thought I'd post and hope
that other users would respond.  (The verbs were 
described but not included in the message.) 

Certainly the verbs described provide exactly the
capability I would find useful.

BTW, I understand Mike can browse comp.lang.apl but
at this point can not post.

Cheers, and thanks Mike,
Emmett 

>
>To: emclean@sfsuvax1.sfsu.edu
>Newsgroups: comp.lang.apl
>
>I have just finished some J verbs to provide access to files by key
>value. These might be what you're looking for. Usage is as follows.
>
>Create <'filename'         Creates a file and initializes its directory.
>(key;value)Put <'filename' Stores value in filename by key, any noun.
>key Get <'filename'        Returns value stored in filename under key.
>Dir <'filename'            Returns a directory showing the file's keys and
>                           where they are located in filename.
>
>                           There will be a few other verbs, e.g. Find
>                           and Squeeze.
>
>These verbs take care of growing replaces. If a Put is of a new key, the
>value is padded and appended to the end of the file. If the Put is of an
>existing key, it goes back in the existing slot, if it fits. If it doesn't
>fit, the value is padded and appended.
>
>The representation of J objects in a file uses 5!:5. This means that keys
>can be more than the usual character strings. You can quite happily have
>i.4 10 as a key. Precision of representation depends entirely on 5!:5.
>Values are recreated with ". .
>
>For your particular example, you could:
>
>Create f=.<'NFL'
>Team=. whatever...
>('Miami';Team)Put f
>
>Then later,
>
>Team =. 'Miami' Get f
>Team =. Team plus some new information
>('Miami';Team)Put f
>
>This is all a little fragile today, but if it's of interest, I'd be happy
>to improve it and make it available.
>
>Mike Powell
>
From: mdanjou@gel.ulaval.ca (Martin D'Anjou)
Newsgroups: comp.lang.apl
Subject: Is there a FAQ? What is J?
Date: 19 Dec 92 00:34:36 GMT
Organization: Universite Laval

Hello,
	Some time ago I learned APL. I have general questions for this news group. I know my questions are silly beginner's questions but here it goes: 

1) Where can I get the APL for Sun system, and at what price?
2) Is APL shareware?
3) What is the J language, where can I buy it, what is the cost?
4) Where can I get some documentation on the J language?
5) How do you folks talk to each other without the APL special characters!?
6) Which computers can run J (Sun, PC)?

The reason I ask these questions is because APL is not very popular here and no news on APL has come to this place for some time.

Thanks
Martin d'Anjou
mdanjou@gel.ulaval.ca
Newsgroups: comp.lang.apl
From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Subject: Re: Rank of a verb
Organization: Traveller
Date: Thu, 17 Dec 1992 17:27:05 GMT

some variation on
   rank=.('v=.-"x.'; '>2{5!:2<''v''') : 1
would probably be useful for determining rank.  (Note that this code
fragment returns a character result, while a numeric result is
probably more desireable).

Raul
Newsgroups: comp.lang.apl
From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Re: A verb to trim spaces from a string
Organization: San Francisco State University
Date: Sun, 13 Dec 1992 00:17:42 GMT

   Here is an alternate set of verbs which take
   or tail until there is no match. 
   
   rtrim =. ' '&$: : (}:@]^:([ = {:@]))
   ltrim =. ' '&$: : (}.@]^:([ = {.@]))
   ctrim =. ' '&$: : ([ ltrim [ rtrim ])

   Emmett emclean@sfsuvax1.sfsu.edu
   
Newsgroups: comp.lang.apl
From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Subject: Re: Copulas in Hooks and Forks?
Organization: Traveller
Date: Sat, 12 Dec 1992 17:37:34 GMT

   a =. '(unbox1 box (x.f. @ unbox2))' : 1

try 
a =. '(unbox1 box (x. @ unbox2))' : 12

which should compile to tacit form, and which (if you have 5 included
in your function display types) has the display representation:
(@unbox2) (unbox1`box`) \
From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Seek examples of BFS or DFS and implementation of tree DS
Organization: San Francisco State University
Distribution: NA
Date: Thu, 17 Dec 1992 22:34:02 GMT

It would be nice to know how to implement a tree and 
execute depth first search or breath first search 
in J.  (RR's example in his docify program is about
the closest thing I've seen.)  Postfix or infix traversal
of a tree would be nice to see also.

Does anyone have any examples ?

It may be that a knowledgable programmer could implement
BFS type algorithms without using a tree data structure.
But some programmers would be sceptical, and besides,
"inquiring minds want to know" -:).

Thanks,
Emmett
   
emclean@sfsuvax1.sfsu.edu
Newsgroups: comp.lang.apl
From: pmoore@cix.compulink.co.uk (Paul Moore)
Subject: Rank of a verb
Reply-To: pmoore@cix.compulink.co.uk
Date: Sat, 12 Dec 1992 18:19:00 +0000


In the dictionary of J, under the definition of the rank conjunction
("), there is an example of how to find the monadic rank of a verb v

    mr =. 8-#$1:"v a=.i.8#1

I think I understand how this works (just barely!), but I can't see any
obvious way of generalising it to provide the dyadic ranks.

Is there any way of finding the ranks of a verb, in J? That is, an
adverb rank which, when applied to a verb, gives its ranks as an array
of 3 integers. (Can an adverb produce a noun as its result? If not, how
can one do this? The only way I can think of is to produce a verb which
takes a dummy argument and returns the required noun. End of digression)

Eg,

    + rank
_ 0 0
    |: rank
_ 1 _
    %. rank
2 _ 2

If there is no way in J as it stands at present, can I suggets that it
would be a useful addition?Being able to determine what rank J thinks a
complex tacit verb has would certainly be useful (to me, at least) in
understanding how ranks and verb combinations interact. Such an operator
could be added as part of the "representation" set of xenos. Something
like 5!:55, maybe?

Paul Moore.

------------------------------------------------------------------------
Paul Moore (pmoore@cix.compulink.co.uk)   |
------------------------------------------------------------------------
"You're talking about a pope who can't find a chicken in a cave."
------------------------------------------------------------------------
From: fn00@gte.com (Farshad Nayeri)
Newsgroups: comp.lang.modula3
Subject: What happenned to Wr.Error and Rd.Error...
Date: 20 Dec 92 16:29:42 GMT
Organization: GTE Laboratories, Waltham, Massachusetts, USA


Documentation for the "Wr" interface, on page 133 of SPwM3 says:

  Illegal operations (for example, writing to a closed writer) raise
  the exception "Error".

At some point of time, exception "Error" was changed to a checked
run-time error. The current "Wr" interface says:

  Illegal operations (for example, writing to a closed writer) cause
  checked runtime errors by raising an internal exception.

I was just wondering about the reason for this change...

Thanks,

--farshad

--
Farshad Nayeri                Intelligent Database Systems
fn00@gte.com                  Computer and Intelligent Systems Laboratory
(617)466-2473                 GTE Laboratories, Waltham, MA

  "Our research shows that even double-clicking can be hard concept for
  some new users to grasp." -- John Cook, Apple consumer product manager
Newsgroups: comp.lang.modula3