Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!bu.edu!snorkelwacker!bloom-beacon!eru!hagbard!sunic!news.funet.fi!uwasa.fi!ts From: ts@uwasa.fi (Timo Salmi LASK) Newsgroups: comp.lang.pascal Subject: Re: It would be convenient to have a TP UNDERLINE string function Message-ID: <1990Sep10.202742.12480@uwasa.fi> Date: 10 Sep 90 20:27:42 GMT References: <24397@adm.BRL.MIL> <1990Sep5.163924.2864@uwasa.fi> <1990Sep10.144853.5157@cs.umu.se> Organization: University of Vaasa Lines: 24 In article <1990Sep10.144853.5157@cs.umu.se> peter@cs.umu.se (Peter Lundberg) writes: >In article <1990Sep5.163924.2864@uwasa.fi> ts@uwasa.fi (Timo Salmi LASK) writes: >>In article <24397@adm.BRL.MIL> J_SCHULL@acc.haverford.edu (Jonathan Schull) writes: >>>that would let you write lines like, >>>WRITELN('I want to underline ',UNDERLINE('this phrase,'),' not this one'); >>>Does anyone know the appropriate magic? >>Yes, sure. And the magic is called the graphics mode. >> >There is absolutetly no need to do this in graphics mode, it's much easier >to write the string directly to memory, setting the attribute byte to it's >appropriate value. And it's a heck of a lot faster to! Ah, the there is a catch in your statement. Unless you have an "appropriate" graphics adapter there is no "appropriate" value for the attribute byte. Seriously, this solution is not general. The fastest kludge is probably using the ansi.sys trick suggested by several posters. Else hercules text mode simulation (not always available, mind you) by setting your appropriate attribute byte, or back to the general graphics solution. ................................................................... Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun