Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Word to String (https://www.delphipraxis.net/21401-word-string.html)

Patrick 2. Mai 2004 13:25


Word to String
 
Hallo,

Mich würde interessieren, wie man Word in String umwandelt, und umgekehrt.
Dürfte doch eigentlich nicht so problematisch sein...?

toms 2. Mai 2004 13:27

Re: Word to String
 
Zitat:

Word in String umwandelt,
IntToStr()

Zitat:

und umgekehrt
StrToInt()

Ratte 2. Mai 2004 13:28

Re: Word to String
 
hi,
Delphi-Quellcode:
inttostr(x);
Ratte

Patrick 3. Mai 2004 13:44

Re: Word to String
 
Auf so etwas muss man ersteinmal kommen, das ist ja viel zu einfch...

Ich bin gerade dabei für ein Spiel die Tastenauswahl zu realisieren:
Ich dachte immer, dass der Typ word so z.B. etwas sei: "VK_TAB"!?

Sharky 3. Mai 2004 13:51

Re: Word to String
 
Zitat:

Zitat von Patrick
...Ich dachte immer, dass der Typ word so z.B. etwas sei: "VK_TAB"!?

VK_TAB ist einfach nur eine Konstannte die in der Unit "Windows" deklariert ist;

Delphi-Quellcode:
const
  {$EXTERNALSYM VK_TAB}
  VK_TAB = 9;

maximov 3. Mai 2004 15:24

Re: Word to String
 
Zitat:

Zitat von Patrick
Ich dachte immer, dass der Typ word so z.B. etwas sei: "VK_TAB"!?

Dem namen zu folge könnte man ja auch denken, dass ein word ein 'wort' ist...is aber nur der standard bezeichner für ein vorzeichenlosen 16 bit integer :wink:


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:37 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz