Sharp PC-G850VS EOF?
|
09-19-2018, 04:25 PM
Post: #1
|
|||
|
|||
Sharp PC-G850VS EOF?
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?
Tom L Cui bono? |
|||
09-20-2018, 02:41 AM
Post: #2
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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. --Bob Prosperi |
|||
09-20-2018, 07:43 AM
Post: #3
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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? If Ctrl-Z doesn't work, and the Unix guys had some influence, try Ctrl-D (ASCII EOT) as that was the default terminal character to signal EOF when typed at the start of a line on a terminal. I guess the 'Ctrl' key is the one marked 'カナ' ('KAN' in katakana)? — Ian Abbott |
|||
09-20-2018, 09:27 AM
Post: #4
|
|||
|
|||
(SOLVED) RE: Sharp PC-G850VS EOF?
(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. Tom L Cui bono? |
|||
09-20-2018, 11:18 AM
(This post was last modified: 09-20-2018 11:19 AM by Zaphod.)
Post: #5
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
Another one for the book
..... you know the book |
|||
09-20-2018, 12:41 PM
Post: #6
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(09-20-2018 11:18 AM)Zaphod Wrote: Another one for the book "I don't want any more cracks about the Book." - Bela Okmyx in Star Trek episode, A Piece of the Action Tom L Cui bono? |
|||
09-20-2018, 01:09 PM
Post: #7
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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? I just looked in the manual. It is actually stated there under section 8.12. Library Functions: Quote:When redirecting to the printer with SHIFT (or 2ndF) + (P->NP) , the input functions return the following: I'll rewrite this passage so it is a little clearer. |
|||
09-20-2018, 02:23 PM
(This post was last modified: 09-20-2018 02:24 PM by toml_12953.)
Post: #8
|
|||
|
|||
RE: Sharp PC-G850VS 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. 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 Tom L Cui bono? |
|||
09-20-2018, 02:59 PM
Post: #9
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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 --Bob Prosperi |
|||
09-20-2018, 03:04 PM
Post: #10
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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. 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, 04:13 PM
Post: #11
|
|||
|
|||
RE: Sharp PC-G850VS EOF? | |||
09-20-2018, 05:06 PM
Post: #12
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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. I'm behind the times as usual! I had 2.21. Thanks for the heads-up! Tom L Tom L Cui bono? |
|||
09-20-2018, 05:14 PM
Post: #13
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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' .) — Ian Abbott |
|||
09-20-2018, 05:42 PM
(This post was last modified: 09-20-2018 05:45 PM by toml_12953.)
Post: #14
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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. I was wrong (not the first time!) getc and fgetc both use stdin, stdaux or stdaux1 for the parameter. Why two functions that do the same thing? Dunno, Tom L Tom L Cui bono? |
|||
09-20-2018, 05:44 PM
Post: #15
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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)? At least you were wrong in two languages at the same time! I can only be wrong in one at a time! Tom L Tom L Cui bono? |
|||
09-20-2018, 06:06 PM
Post: #16
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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 Knowing Bela, he more likely said "I don't want no more cracks about the Book", but that probably doesn't help much... It's a Star Trek thing, either you get it and smile, or it can't be readily explained. Just like so many other Star Trek things... --Bob Prosperi |
|||
09-20-2018, 06:41 PM
Post: #17
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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)? The Wrath of KAN Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
09-20-2018, 07:55 PM
Post: #18
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(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' .) *Groan!* Tom L Cui bono? |
|||
09-20-2018, 08:26 PM
(This post was last modified: 09-20-2018 08:27 PM by Zaphod.)
Post: #19
|
|||
|
|||
RE: Sharp PC-G850VS EOF? | |||
09-20-2018, 09:02 PM
Post: #20
|
|||
|
|||
RE: Sharp PC-G850VS EOF?
(09-20-2018 08:26 PM)Zaphod Wrote:(09-20-2018 07:55 PM)toml_12953 Wrote: The Wrath of KAN ST-TNG for me, thanks. ;) Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)