Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does #9 mean. 1

Status
Not open for further replies.

davidrobin

Programmer
Aug 17, 2000
50
0
0
GB
I am trying to understand some delphi code.

i = Pos(#9, f1)

Can some one tell me what the #9 means.

David
Visual Basic 6 Ent
 
#9 = Chr(9);
The character with the asci code 9

For example #65 = 'A'
#13 : enter
 
(#9) is the ASCII for the TAB character, so what the code is doing is trying to find if the TAB character exists in the string f1.
 
Actually, it's assigning the position of the tab in the string f1 to the integer i.

f1 := 'This has a <tab> here';
i := Pos(#9, f1);

i will equal 11 or the position in the string where the tab is.

HTH

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top