Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Not widely known problem in programming? (Developers)

posted by Laaca Homepage, Czech republic, 29.03.2021, 05:04

> I was curious about the meaning of your example. The FreePascal
> description of
> the pchar type confirms my expectation: the #0 inserts a zero
> terminator into the s variable, and @s[1] makes a pointer to the message
> data. (I think 0 would point to the string-type object's length counter?)

Yes, exactly. S[0] is the length of the string (so this is the reason why this type of string variable is limited to 255 chars) and the chars begin from S[1]

---
DOS-u-akbar!

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 87 users online (1 registered, 86 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum