🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sbcs.cse114
Article #6

Re: pascal trouble

#6
From: SpaceMan Spiff?
Date: Sun, 12 Apr 1992 13:24
36 lines
1719 bytes
In article <1992Apr12.024103.27635@sbcs.sunysb.edu> dtiberio@csws7.ic.sunysb.edu (David Tiberio) writes:
>
>	I have to do a database option where the user presses
>RETURN if he does not want the data changed. The string read
>in is an array of length 9. This is what I tried:
>
>	if string = '         ' then data_does_not_change;
>
>	This line is not being read for some reason the way
>I would expect it to. Should this work? It could be that I forgot
>something somewhere else, but I have had problems like this
>throughout this program.
>
>
>-- 
>      //   David Tiberio  SUNY Stony Brook 2-3662  AMIGA  DDD-MEN   
>     //  Not the llama! Come here Earl; I want to tell you something...
>   \X/  Liverpool, New York	flames to suggestions@cbmvax.commodore.com

Try This:

Temp : String;

Begin
 Readln(Temp);
 If Temp <> '' Then Current := Temp;


When the user hits return and hasn't typed anything then there will be
no change made to the current string.  If the user did type something then
it is assumed that they wanted a change, which is done.

Hope this help

-MAtthew Crocker
s1949782@titan.ucc.umass.edu
Technical Details
Message-ID: <1992Apr12.132439.22812@nic.umass.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.mtholyoke.edu!nic.umass.edu!titan.ucc.umass.edu!s1949782
References: <1992Apr12.011409.26898@sbcs.sunysb.edu> <1992Apr12.024103.27635@sbcs.sunysb.edu>

Show Full Headers
Complete Article Headers
Newsgroups: sbcs.cse114,comp.lang.pascal
Path: arc1-ca.pugleaf.net!sparky!uunet!news.mtholyoke.edu!nic.umass.edu!titan.ucc.umass.edu!s1949782
From: s1949782@titan.ucc.umass.edu (SpaceMan Spiff?)
Subject: Re: pascal trouble
Message-ID: <1992Apr12.132439.22812@nic.umass.edu>
Sender: usenet@nic.umass.edu (USENET News System)
Nntp-Posting-Host: titan.ucc.umass.edu
Organization: University of Massachusetts, Amherst
References: <1992Apr12.011409.26898@sbcs.sunysb.edu> <1992Apr12.024103.27635@sbcs.sunysb.edu>
Distribution: na
Date: Sun, 12 Apr 1992 13:24:39 GMT
Lines: 37