🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #741

Re: Can I write an artificial boyfriend with Pascal ???

#741
From: Andrzej Grażyński
Date: Thu, 16 Jun 2005 22:29
42 lines
2116 bytes
Tristan Beeline napisał(a):
> I'm sooo lonely, I need to write myself an artificial boyfriend.
> 
> Can I do this in Pascal ?

YES:

program MyDear;
{ (C) A.Grazynski PhD }
const
   ShyQuest = 'Make love?';
var
   S: String;
   PatienceCounter, PatienceResource: integer;
   MinimumPatience = 10; {25 in Eastern Europe}
begin
   PatienceResource := Random(1000) + MinimumPatience;
   PatienceCounter := 0;
   repeat
     Write('?');Readln(S);
     if S <> '' then
     begin
       if S = ShyQuest
       then
         RunError(69);  { Termination }

       Inc(PatienceCounter);
       if S[Length(S)] = '?'
       then
         Writeln('Yes, my dear.')
       else
         Writeln('Really?')
     end;
   until PatienceCounter > PatienceResource;

   Writeln('Co to hell!');

   { Another Termination }

end.

{ ... and no other terminations! }
Technical Details
Message-ID: <d8sv0m$5ap$1@nemesis.news.tpi.pl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.icp.pl!newsfeed.atman.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <55f4364e.0506132213.4ac7d0e6@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111659,7df47bad293c7f2d
X-Google-Thread: fd0c2,7df47bad293c7f2d
X-Google-Attributes: gid111659,gidfd0c2,public
X-Google-Language: ENGLISH,UTF8
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.icp.pl!newsfeed.atman.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Andrzej Grażyński <grazynsk@petex.com.pl>
Newsgroups: comp.lang.pascal.borland,finet.unet
Subject: Re: Can I write an artificial boyfriend with Pascal ???
Date: Fri, 17 Jun 2005 00:29:50 +0200
Organization: PETEX Service
Lines: 42
Message-ID: <d8sv0m$5ap$1@nemesis.news.tpi.pl>
References: <55f4364e.0506132213.4ac7d0e6@posting.google.com>
Reply-To:  grazynsk@petex.com.pl
NNTP-Posting-Host: cex88.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: nemesis.news.tpi.pl 1118961494 5465 83.30.199.88 (16 Jun 2005 22:38:14 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Thu, 16 Jun 2005 22:38:14 +0000 (UTC)
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: pl, en-us, en
In-Reply-To: <55f4364e.0506132213.4ac7d0e6@posting.google.com>