Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!freja.diku.dk!rimfaxe.diku.dk!damm From: damm@rimfaxe.diku.dk (Kristian Damm Jensen) Newsgroups: comp.lang.pascal Subject: Re: initialization of a string Message-ID: <1990Apr8.130915.3107@diku.dk> Date: 8 Apr 90 13:09:15 GMT References: <7198@uhccux.uhcc.hawaii.edu> Sender: news@diku.dk (The Netnews System) Organization: Department Of Computer Science, University Of Copenhagen Lines: 27 qiming@uhccux.uhcc.hawaii.edu (Qiming Huang) writes: >... how can I initialize >a string in Standard Pascal ( Not TP or UCSD Pascal) and write it to >a nontext file as part of the output. I presume that by string you mean a variable declared as type string : packed array [1..n] of char; var foo : string; f : file of string; This variable is easily initialized using an assignment: foo := 'Any string of length n' but it is necesary (sp?) that the expression is a string of length exacty n characters. To write on a nontext-file you have to declare f as above and write as usual. Kristian ------------------------------------------------------------------------- Kristian Damm Jensen (damm@freja.diku.dk)