[Info-vax] VMS Features I Wish Linux Had

VAXman- at SendSpamHere.ORG VAXman- at SendSpamHere.ORG
Wed Jun 15 07:57:06 EDT 2016


In article <njr6tb$jg3$1 at Iltempo.Update.UU.SE>, Johnny Billquist <bqt at softjar.se> writes:
>On 2016-06-15 00:27, David Froble wrote:
>> VAXman- @SendSpamHere.ORG wrote:
>>> In article <njphlo$sa6$1 at Iltempo.Update.UU.SE>, Johnny Billquist
>>> <bqt at softjar.se> writes:
>>>> On 2016-06-14 12:35, VAXman- at SendSpamHere.ORG wrote:
>>>>> Explain?  A 'read' of what? ...from where?
>>>> A read of a string, from a terminal, to a program.
>>>>
>>>> In BASIC:
>>>>
>>>> LINPUT FOO$
>>>>
>>>> In MACRO-11:
>>>>
>>>> QIOW$S  #IO.RLB,#TILUN,#TIEFN,,#IOSB,,<#BUF,#BUFSIZ>
>>>>
>>>> In C:
>>>>
>>>> fgets(buffer, bufsiz, stdin);
>>>>
>>>> In FORTRAN-77:
>>>>
>>>>     READ(5,10) STR
>>>> 10  FORMAT(1A80)
>>>>
>>>>
>>>> It should not be that hard to get. ;-)
>>>
>>> And those things don't work?  Sure they do but where is there any
>>> implication
>>> that you should be able to edit the input in those?
>>>
>>
>> Well, I had this simple program laying around, and used it as an example.
>>
>> 10      Input "Temp F"; t
>>         GoTo 99 Unless t <> 0.
>>
>>         c = ( t - 32 ) * 5 / 9
>>         Print c
>>
>>         GoTo 10
>>
>> 99      End
>>
>> Ready
>>
>> run
>> TEMP    14-JUN-2016 18:24
>>
>> Temp F? 123
>> DFE90A::DFE 18:24:13 BASIC     CPU=00:00:01.28 PF=2638 IO=789 MEM=1140
>> Temp F? 423
>>  217.222
>>
>> Note, I typed 123, then a ^T to get on a new line to leave the 123
>> there, then 3 left arrows and a 4.  The data ended up being 423.  Is
>> that what's being asked?
>
>Right. And this works because it is in the terminal driver. People are 
>arguing that it should not be there, in which case your example would 
>stop working. I would consider that to be a bad thing. Other here are 
>arguing that this would be a good thing, and that if you want to have 
>line editing in your program, you should link to SMG$ routines, and do 
>your reading through there, or possibly some other library, like GNUs 
>readline library. Or possibly doing callbacks to your CLI...
>
>While I have been disagreeing with that view, and keep saying that I 
>think the terminal driver is the correct place for this functionality to 
>sit. Just as terminal echoing and handling of rubout, and other basic 
>editing should be in the terminal driver, and not be implemented in 
>every program. But I seem to be very alone in that view.

That's NOT waht you've been arguing.  THere IS line editing in the terminal
driver but it's limited.  Extending that to 'vi' and 'emacs' capabilities is
NOT appropriate in the terminal driver.  Put it where it belongs!

-- 
VAXman- A Bored Certified VMS Kernel Mode Hacker    VAXman(at)TMESIS(dot)ORG

I speak to machines with the voice of humanity.



More information about the Info-vax mailing list