Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!osu-cis!mstar!westfort!dragon From: dragon@westfort.UUCP (The Mystic) Newsgroups: comp.lang.pascal Subject: Converting Strings to Char Message-ID: <1701@westfort.UUCP> Date: 16 Feb 89 04:25:26 GMT References: <459@loligo.cc.fsu.edu> <950017@hpcllmr.HP.COM> Reply-To: westfort!dragon@tut.cis.ohio-state.edu Organization: Outside the Asylum at the Western Fortress Lines: 42 A program that I'm currently working w/ via the communications port, modem ectal, a routine within it sends characters out in the form of CHAR, as the user types on the keyboard.. I've wanted to make use of this routine to send strings across, yet there's a conflict in my methods.. Seeing as I can't make a string of VAR form CHAR, I make it a string[80], and then using the copy command, take it apart one character at a time into a string[1]; and try to pass it off into the send routine.. I havn't been able to find a way to bypass the var type checking, or convert the string into a character form in order for me to do this.. I'm using Turbo Pascal 5.0.. Any help would be appreciated.. The program I'm using uses the x00.sys driver for it's I/O.. A sample program would be...: procedure send(ch:char); var t:registers; begin t.ah:=$0b; t.al:=ord(ch); foss(t); end; procedure test; var x:integer; s:string[80]; sd:string[1]; begin s:='Hello'; for x:=1 to length(s) do begin sd:=copy(s,x,1); send(sd); (* The problem.. Can't send a string through as a char.. *) end; end; begin test; end. Jason