Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!brutus.cs.uiuc.edu!psuvax1!psuvm!tbc101 From: TBC101@PSUVM.BITNET (TomShark Collins) Newsgroups: comp.lang.pascal Subject: Re: uppercase and char and string[1]; Message-ID: <89321.122908TBC101@PSUVM.BITNET> Date: 17 Nov 89 17:29:08 GMT References: <5477@uhccux.uhcc.hawaii.edu> Organization: Penn State University Lines: 22 In article <5477@uhccux.uhcc.hawaii.edu>, cs211s65@uhccux.uhcc.hawaii.edu (Cs211s65) says: > Secondly, Despite my teacher's dislike of Turbo Pascal, I broke down and >used a STRING[1] type, BUT, when I try to use ord or chr functions it >gave me a TYPE MISMATCH error, so I wanted to make it into a char character. >so I char_letter := string_letter; but the compiler would now accept it. >How do I make a single length STRING[1] type character to a CHAR character? > The following shows how to assign a string of length 1 to a character: Program X; Var SmallStr :String[1]; Character:Char; Begin ... Character := SmallStr[1]; ... End. ------- Tom "Shark" Collins Since ICS is comprised of 2 people, my views tbc101@psuvm.psu.edu are the opinion of at least 50% of the company.