Re: HELP!! Two questions from <<the c programming language>>



Guru Jois wrote:

A bunch of not-C, for no terribly good reason but:

while EOF

I don't think so.

do
begin
input char
if char = space then
begin
if flag = 0 then

No declaration for `flag`; hence, no know state.

begin
let flag = 1;
print char;
end
end
else
begin
let flag = 0
print char
end
end
goto step 2

You have no step 2 (in fact you have no steps).

You don't need `goto` for this problem, especially if you're
going to write in an invented pseudocode.

end while

Make up your mind whether you're using begin-end blocks or
whether your control-structures have end-Whatever syntax.

--
"He's dead, Jim, but not as we know it." Unsaid /Trek/

Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England

.



Relevant Pages

  • new syslogd option for adding local timestamp
    ... I ported the -T option from netbsd syslogd.c to freebsd syslog. ... "Add a -T flag to syslogd, which causes it to use local time for ... -printline(const char *hname, char *msg) ... +Always use the local time and date for messages received from the ...
    (freebsd-hackers)
  • [UNIX] Cyrus Sieve / libSieve Buffer Overflow
    ... These overflows allow remote attackers to cause ... Problem comes when giving the script a>100 chars long corrupted header ... name,>100 chars long IMAP flag or a script that contains lots of errors ... to overflow the 500 char limit in error message. ...
    (Securiteam)
  • Re: [RFC] cpuset relative memory policies - second choice
    ... the mpol_nodemask_mode already is char. ... It doesn't manage this flag ... get_mempolicy call was to reduce the likely rate of bugs in user ... a bitmask that they calculated using Choice B node numbering, ...
    (Linux-Kernel)
  • [RFC/PATCH] Per-device parameter support (4/16)
    ... They appear as boolean parameter to the outside, ... specified flag to flags when the specified boolean value is 1 and 0 ... +int param_array(const char *name, const char *val, ...
    (Linux-Kernel)
  • Re: HELP!! Two questions from <>
    ... if char = space then ... No declaration for `flag`; hence, ... You don't need `goto` for this problem, ...
    (comp.lang.c)