Comment

Comment by vrruiz

Well, other simpler options are:

  if (input in ['Y', 'y']) then
    WriteLn('blah blah')
  else if (input in ['N', 'n']) then
    WriteLn('blah')
  else
    WriteLn('Input invalid');
And:

  if (LowerCase(input) = 'y') then
    WriteLn('blah blah')
  else if (LowerCase(input) = 'n') then
    WriteLn('blah')
  else
    WriteLn('Input invalid');
parent vrruiz 2 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton