Sharp PC-G850VS EOF? - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: Not HP Calculators (/forum-7.html) +--- Forum: Not remotely HP Calculators (/forum-9.html) +--- Thread: Sharp PC-G850VS EOF? (/thread-11419.html) |
Sharp PC-G850VS EOF? - toml_12953 - 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? RE: Sharp PC-G850VS EOF? - rprosperi - 09-20-2018 02:41 AM (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. RE: Sharp PC-G850VS EOF? - ijabbott - 09-20-2018 07:43 AM (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)? (SOLVED) RE: Sharp PC-G850VS EOF? - toml_12953 - 09-20-2018 09:27 AM (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. RE: Sharp PC-G850VS EOF? - Zaphod - 09-20-2018 11:18 AM Another one for the book ..... you know the book RE: Sharp PC-G850VS EOF? - toml_12953 - 09-20-2018 12:41 PM (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 RE: Sharp PC-G850VS EOF? - jwhsu - 09-20-2018 01:09 PM (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. RE: Sharp PC-G850VS EOF? - toml_12953 - 09-20-2018 02:23 PM (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 RE: Sharp PC-G850VS EOF? - rprosperi - 09-20-2018 02:59 PM (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-10520-post-100281.html#pid100281 RE: Sharp PC-G850VS EOF? - jwhsu - 09-20-2018 03:04 PM (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. RE: Sharp PC-G850VS EOF? - Zaphod - 09-20-2018 04:13 PM (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 RE: Sharp PC-G850VS EOF? - toml_12953 - 09-20-2018 05:06 PM (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 RE: Sharp PC-G850VS EOF? - ijabbott - 09-20-2018 05:14 PM (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' .) RE: Sharp PC-G850VS EOF? - toml_12953 - 09-20-2018 05:42 PM (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 RE: Sharp PC-G850VS EOF? - toml_12953 - 09-20-2018 05:44 PM (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 RE: Sharp PC-G850VS EOF? - rprosperi - 09-20-2018 06:06 PM (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... RE: Sharp PC-G850VS EOF? - Massimo Gnerucci - 09-20-2018 06:41 PM (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 RE: Sharp PC-G850VS EOF? - toml_12953 - 09-20-2018 07:55 PM (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!* RE: Sharp PC-G850VS EOF? - Zaphod - 09-20-2018 08:26 PM (09-20-2018 07:55 PM)toml_12953 Wrote: The Wrath of KAN I got that one however (gimme the Old original Star Trek or nothing - post Jim Kirk does nothing for me) RE: Sharp PC-G850VS EOF? - Massimo Gnerucci - 09-20-2018 09:02 PM (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. ;) |