HP3000-L Archives

May 2010, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Roy Brown <[log in to unmask]>
Reply To:
Roy Brown <[log in to unmask]>
Date:
Wed, 26 May 2010 17:17:59 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (51 lines)
In message <[log in to unmask]>, Michael 
Caplin <[log in to unmask]> writing at 11:20:01 in his/her local time 
opines:-

>I have a subprogram that can be called from a block or character mode main
>program and I want the sub to know which called it without anything being
>passed in linkage.  I can think of some ugly ways to do it.  Does anyone know
>of an easy/simple way.
>TIA,
>mike

If I'm not being too pedantic, there's no such thing as a 'block mode or 
character mode' program, but rather a program that has its terminal, or 
some equivalent I/O device, in block or character mode at the time the 
subprogram is called.

Looked at like this, it's perhaps clearer that what the subprogram needs 
to do when it starts up is to query the terminal to see what mode it is 
in at that time.

If you know this will always be used with Reflection, you can query 
that:-
===================================================
Syntax
object.BlockMode
object.BlockMode = Value

Works with
Data type       Boolean

Description

Returns (first syntax line) or specifies (second syntax line) whether 
Reflection is in HP block mode. Typically this property is set by the 
host rather than by the user.

Values

The default value is False.
===================================================

There's probably something you can do based on an escape sequence which 
will work with any emulator or even a real HP terminal, though I haven't 
seen one of those lately.
-- 
Roy Brown        'Have nothing in your houses that you do not know to be
Kelmscott Ltd     useful, or believe to be beautiful'  William Morris

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2