marxb@yvax.byu.edu (11/29/89)
I am a relatively new user to TP and was wondering if there is anyone that can tell me how to write variable data to the screen while in graphics mode. I have tried to use OutTextXY() but have been unsuccessful. It works fine if I include the string as part of the command but I can't seem to get it to send the value(s) of a declared variable. Any help is appreciated.
ts@uwasa.fi (Timo Salmi LASK) (11/30/89)
In article <942marxb@yvax.byu.edu> marxb@yvax.byu.edu writes: >I am a relatively new user to TP and was wondering if there is anyone that can >tell me how to write variable data to the screen while in graphics mode. I >have tried to use OutTextXY() but have been unsuccessful. It works fine if I >include the string as part of the command but I can't seem to get it to send >the value(s) of a declared variable. Any help is appreciated. OutTextXY takes only strings, so what you will have to do for values is to first convert them to strings. Fortunately, this is very easy. Just use Turbo Pascal's Str procedure for example like this: var a : real; var s : string; . a := 3.14; Str (a:10:2, s); s := 'The value is ' + s; OutTextXY (1, 10, s); ................................................................... Prof. Timo Salmi (Site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: vakk::salmi Bitnet: salmi@finfun