09-19-2018, 04:25 PM
Many C programs use getchar in a loop that's exited by an EOF signal. I don't see how to generate that on the PC-G850VS if it's even possible at all. Does anyone know how to signal EOF to a running C program on the PC-G850VS?
(09-19-2018 04:25 PM)toml_12953 Wrote: [ -> ]Many C programs use getchar in a loop that's exited by an EOF signal. I don't see how to generate that on the PC-G850VS if it's even possible at all. Does anyone know how to signal EOF to a running C program on the PC-G850VS?
(09-20-2018 02:41 AM)rprosperi Wrote: [ -> ](09-19-2018 04:25 PM)toml_12953 Wrote: [ -> ]Many C programs use getchar in a loop that's exited by an EOF signal. I don't see how to generate that on the PC-G850VS if it's even possible at all. Does anyone know how to signal EOF to a running C program on the PC-G850VS?
You're really stressing some of the (really) old memory banks...
Try Ctrl-Z. This was often used back in the DOS days.
It may also help to know most of the guys in the Sharp Engineering Dept that developed the pocket computers were Unix guys.
(09-19-2018 04:25 PM)toml_12953 Wrote: [ -> ]Many C programs use getchar in a loop that's exited by an EOF signal. I don't see how to generate that on the PC-G850VS if it's even possible at all. Does anyone know how to signal EOF to a running C program on the PC-G850VS?
(09-20-2018 11:18 AM)Zaphod Wrote: [ -> ]Another one for the book
..... you know the book
(09-20-2018 09:27 AM)toml_12953 Wrote: [ -> ](09-19-2018 04:25 PM)toml_12953 Wrote: [ -> ]Many C programs use getchar in a loop that's exited by an EOF signal. I don't see how to generate that on the PC-G850VS if it's even possible at all. Does anyone know how to signal EOF to a running C program on the PC-G850VS?
Thanks for answering, guys! There's no control key and the KAT key didn't work.
By accident I discovered that Shift-Enter together or 2ndF then Enter does work.
At last I know! Now I'm going to try to find out if there are other control sequences possible.
Quote:When redirecting to the printer with SHIFT (or 2ndF) + (P->NP) , the input functions return the following:
getch: 0xFF
all other input functions: EOF
(09-20-2018 01:09 PM)jwhsu Wrote: [ -> ]Thanks! I won't waste time looking for a generalized control key, then.(09-20-2018 09:27 AM)toml_12953 Wrote: [ -> ]Thanks for answering, guys! There's no control key and the KAT key didn't work.
By accident I discovered that Shift-Enter together or 2ndF then Enter does work.
At last I know! Now I'm going to try to find out if there are other control sequences possible.
I just looked in the manual. It is actually stated there under section 8.12. Library Functions:
(09-20-2018 02:23 PM)toml_12953 Wrote: [ -> ]Did you mean 7.12? That's where it is in my manual.
(09-20-2018 02:23 PM)toml_12953 Wrote: [ -> ](09-20-2018 01:09 PM)jwhsu Wrote: [ -> ]I just looked in the manual. It is actually stated there under section 8.12. Library Functions:Thanks! I won't waste time looking for a generalized control key, then.
Did you mean 7.12? That's where it is in my manual.
Also, what's the difference between getc and fgetc? It seems like they're identical.
Is it possible that getc doesn't use the file stream and uses stdin only?
getc(stream)
rather than
getc(FILE* stream)
That would be more consistent with printf and fprintf.
Tom L
(09-20-2018 12:41 PM)toml_12953 Wrote: [ -> ]"I don't want any more cracks about the Book." - Bela Okmyx in Star Trek episode, A Piece of the Action
(09-20-2018 02:59 PM)rprosperi Wrote: [ -> ](09-20-2018 02:23 PM)toml_12953 Wrote: [ -> ]Did you mean 7.12? That's where it is in my manual.
It is in section 8.12 in the latest version (3.0) of the manual, on p. 85 (PDF p. 121), available at the link in this post:
http://www.hpmuseum.org/forum/thread-105...#pid100281
(09-20-2018 07:43 AM)ijabbott Wrote: [ -> ]I guess the 'Ctrl' key is the one marked 'カナ' ('KAN' in katakana)?
(09-20-2018 03:04 PM)jwhsu Wrote: [ -> ](09-20-2018 02:23 PM)toml_12953 Wrote: [ -> ]Thanks! I won't waste time looking for a generalized control key, then.
Did you mean 7.12? That's where it is in my manual.
Also, what's the difference between getc and fgetc? It seems like they're identical.
Is it possible that getc doesn't use the file stream and uses stdin only?
getc(stream)
rather than
getc(FILE* stream)
That would be more consistent with printf and fprintf.
Tom L
You probably have an earlier version of the manual which doesn't have the chapter on how to use STAT mode. In versions prior to 3.0, it would be section 7.12. You can download the most recent version from here.
As far as getc vs. fgetc, I'm not sure what the difference is. In the original Japanese manual, getc and fgetc has the exact same format and description. You may be right, however, and your alternative format for getc is correct. I'll have to do some testing. Thanks.
(09-20-2018 05:14 PM)ijabbott Wrote: [ -> ](09-20-2018 07:43 AM)ijabbott Wrote: [ -> ]I guess the 'Ctrl' key is the one marked 'カナ' ('KAN' in katakana)?
I completely goofed up that transliteration. 'カナ' is 'KANA' and is presumably a "Japanese character shift" key. (I mistransliterated 'カナ' as 'KAN' and thought it might be short for 'KANtrol' .)
(09-20-2018 04:13 PM)Zaphod Wrote: [ -> ](09-20-2018 12:41 PM)toml_12953 Wrote: [ -> ]"I don't want any more cracks about the Book." - Bela Okmyx in Star Trek episode, A Piece of the Action
Lost on me - sorry
(09-20-2018 05:14 PM)ijabbott Wrote: [ -> ](09-20-2018 07:43 AM)ijabbott Wrote: [ -> ]I guess the 'Ctrl' key is the one marked 'カナ' ('KAN' in katakana)?
I completely goofed up that transliteration. 'カナ' is 'KANA' and is presumably a "Japanese character shift" key. (I mistransliterated 'カナ' as 'KAN' and thought it might be short for 'KANtrol' .)
(09-20-2018 06:41 PM)Massimo Gnerucci Wrote: [ -> ](09-20-2018 05:14 PM)ijabbott Wrote: [ -> ]I completely goofed up that transliteration. 'カナ' is 'KANA' and is presumably a "Japanese character shift" key. (I mistransliterated 'カナ' as 'KAN' and thought it might be short for 'KANtrol' .)
The Wrath of KAN
(09-20-2018 07:55 PM)toml_12953 Wrote: [ -> ]The Wrath of KAN
*Groan!*