From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c2754eda606e296d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-17 06:13:49 PST Message-ID: <3E75D80C.7070206@epfl.ch> Date: Mon, 17 Mar 2003 15:13:32 +0100 From: =?ISO-8859-1?Q?Rodrigo_Garc=EDa?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: pass help References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: lglpc31.epfl.ch X-Trace: epflnews.epfl.ch 1047910423 128.178.76.8 (17 Mar 2003 15:13:43 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!surfnet.nl!seven.news.surf.net!irazu.switch.ch!news-zh.switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:35406 Date: 2003-03-17T15:13:32+01:00 List-Id: David wrote: > How would I go about changing the text the user enters when being > prompted for the password (changing text to passchar's like > asterisks), but still be read what the user is actually typing.. would > it be working along with buffers or is there an simplier method? > > TIA Try something like this (needs to be modified in order to be a bit more flexible): with Ada.Text_IO; use Ada.Text_IO; procedure Password is A : Character; S : String(1..10); begin for I in 1 .. 10 loop Get_Immediate (A); S(I) := A; Put ("*"); end loop; New_Line; Put_Line (S); end Password; Rodrigo