Jump to content

Pascal: The hash symbol?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
FireGator

FireGator

    Learning Programmer

  • Members
  • PipPipPip
  • 37 posts
An example of the code I am wondering about is the following:

foo := #32;

I had tried to look around in documentation but so far could not find anything about it, what would 32 be significant to?

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
With Borland Pascal, #32 is the same as Chr(32), except it is a literal character constant of the ordinal value 32 (i.e.: a space)

You may see it used for something, say as a linebreak (although sLineBreak is there for the better):
ShowMessage('Error:'#13#10'There was a problem with the input.')

Delphi supported Unicode since version 4 I believe: #$133f ($ denoting hexdecimal)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
FireGator

FireGator

    Learning Programmer

  • Members
  • PipPipPip
  • 37 posts
Awesome! This answers my question, thank you. I will definitely be back for more!
>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]
>++++++++[<++++>-] <.>+++++++++++