Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!hsdndev!cmcl2!adm!news From: GRAD205%BRFUEM.BITNET@uga.cc.uga.edu ( Humberto Jose Bortolossi) Newsgroups: comp.lang.pascal Subject: (none) Message-ID: <26762@adm.brl.mil> Date: 3 May 91 02:40:35 GMT Sender: news@adm.brl.mil Lines: 33 On Thu, 2 May 91 15:30:05 IDS said: >Hello , > Is there any developed procedure that would display a real varaiable >in a non exponential format > e.g. > Var x : real; > Begin > x := 1.3; > writeln(x); > End. > > I'd like the output to be 1.3 not in an exponential format. You could use the following format to write(ln): WriteLn(x:l:n); Where l is the length of number (digits and decimal point) and n is the number of digits at right of decimal point. So, if x := 1.3 then WriteLn(x:3:1); OUTPUT ====> 1.3 WriteLn(x:4:2); OUTPUT ====> 1.30 WriteLn(x:10:8); OUTPUT ====> 1.30000000 and so on. Humberto. +----------------------------+----------------------------------------------+ | Alunos da graduacao do | E-MAIL: BITNET= GRAD205@BRFUEM.BITNET | | Curso de Matematica | ANSP= GRAD205@BRFUEM.ANPR.BR | | BRFUEM | GRAD205@NPDVM1.FUEM.ANPR.BR | +----------------------------+----------------------------------------------+ | Fundacao Universidade Estadual de Maringa - FUEM | | Departamento de Matematica - DMA | | Telefax: (0442) 22-2754 | +---------------------------------------------------------------------------+