| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| SetEnvironmentVariable PROBLEM How to get in SHOWMESSAGE dialog box CHAR 'A' ? ---->>>Project1.DPR BEGIN---->>> program Project1; uses SysUtils, Dialogs, Math, Windows; var I:integer; begin I:=FileCREATE('DATA.TXT'); FileWrite(I,'DATA.TXT',Length('DATA.TXT')); FileSeek(I,1,1); FileRead(I,PChar(SetEnvironmentVariable(PChar('DAT A'),nil))^,1); showmessage(GetEnvironmentVariable(PChar('DATA'))) ; end. <<<----Project1.DPR END<<<---- PLEASE HELP. THANK YOU. |
|
#2
| |||
| |||
| On 2008-07-22, Saša Bistrović <sasa.bistrovic@ck.t-com.hr> wrote: > SetEnvironmentVariable PROBLEM First, this is the wrong group for Delphi problems, but > How to get in SHOWMESSAGE dialog box CHAR 'A' ? showmessage('A'); (or specify better what you want). > ---->>>Project1.DPR BEGIN---->>> > program Project1; > > uses > SysUtils, Dialogs, Math, Windows; > > var I:integer; > > begin > I:=FileCREATE('DATA.TXT'); > FileWrite(I,'DATA.TXT',Length('DATA.TXT')); > FileSeek(I,1,1); > FileRead(I,PChar(SetEnvironmentVariable(PChar('DAT A'),nil))^,1); What is this supposed to do? Setenvironmentvariable returns a bool. var c:char; fileread(i,c); showmessage(c); What are you trying to do? |
|
#3
| |||
| |||
| "Marco van de Voort" <marcov@stack.nl> wrote in message news:slrng8bu46.2irh.marcov@snail.stack.nl... If there is replacement for SetEnvironmentVariable to set variable "var c:char;" without definning it in Delphi as : var c:char; if there is replacement as SetEnvironmentVariable for definning "var c:char;" as I above mentioned in : fileread(i,c); showmessage(c); PLEASE HELP. THANK YOU. |
|
#4
| |||
| |||
| In comp.lang.pascal.borland message <g6528n$knh$1@ss408.t-com.hr>, Tue, 22 Jul 2008 18:35:39, Sasa Bistrovic <sasa.bistrovic@ck.t-com.hr> posted: > >If there is replacement for SetEnvironmentVariable to set variable >"var c:char;" without definning it in Delphi as : For Delphi questions, you must ask in a group with "delphi" in its name. -- (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links; <URL:http://www.merlyn.demon.co.uk/clpb-faq.txt> RAH Prins : c.l.p.b mFAQ; <URL:ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.