VaKeR CYBER ARMY
Logo of a company Server : Apache
System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User : vapecompany ( 2719)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/proc/self/root/opt/alt/ruby18/share/ri/1.8/system/IO/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/self/root/opt/alt/ruby18/share/ri/1.8/system/IO/scanf-i.yaml
--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: The trick here is doing a match where you grab one <b>line</b> of input at a time. The linebreak may or may not occur at the boundary where the string matches a format specifier. And if it does, some rule about whitespace may or may not be in effect...
- !ruby/struct:SM::Flow::P 
  body: That's why this is much more elaborate than the string version.
- !ruby/struct:SM::Flow::P 
  body: "For each line: Match succeeds (non-emptily) and the last attempted spec/string sub-match succeeded:"
- !ruby/struct:SM::Flow::VERB 
  body: "  could the last spec keep matching?\n    yes: save interim results and continue (next line)\n"
- !ruby/struct:SM::Flow::P 
  body: "The last attempted spec/string did not match:"
- !ruby/struct:SM::Flow::P 
  body: are we on the next-to-last spec in the string?
- !ruby/struct:SM::Flow::VERB 
  body: "  yes:\n    is fmt_string.string_left all spaces?\n      yes: does current spec care about input space?\n        yes: fatal failure\n        no: save interim results and continue\n  no: continue  [this state could be analyzed further]\n"
full_name: IO#scanf
is_singleton: false
name: scanf
params: (str,&b)
visibility: public

VaKeR 2022