Difference between $ and ~?

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
matthias
Posts: 45
Joined: Fri Apr 22, 2005 2:45 pm
Location: Berlin, Germany

Difference between $ and ~?

Post by matthias »

Besides that fact that I can use the pipe character only in connection with the tilde character I can't see the difference between $ and ~. So, what ist the actual advantage of the tilde character?

Matthias
Jon
Site Admin
Posts: 10074
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

Hi,

This is covered in the User Guide. Basically, the tilde lets you specify whether the enclosed text is to be output based on the presence of data in the precedign (or following, if you use the "break" pipe character) field. It is most useful if you often have references in which certain fields are sometimes filled and sometimes not (e.g. a translator).

Jon
Sonny Software
matthias
Posts: 45
Joined: Fri Apr 22, 2005 2:45 pm
Location: Berlin, Germany

Post by matthias »

Hi Jon,

Thanks, I actually had a look into the user guide, and I am even regularly using both $ and ~. I can get the formats I need using them.

It just came to my mind that nearly all I can do using the tilde I can as well do using the dollar sign posing spaces appropriately. So the only difference seems the possibility to combine the tilde with the pipe character. This is how I understand the user guide. So regard this as a question out of curiosity.

Matthias
Jon
Site Admin
Posts: 10074
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

Hi matthias,

There are times when just changing the spacing and using the $ sign aren't sufficient (especially when it is the field *preceeding* the punctuation that is causing the difficulty when it is missing). There are a number of threads on this forum detailing exact situations that the $ approach couldn't deal with adequately. Adding the ~ to allow back/forward dependencies worked around those problems. I left in the $ method because of (1) backward compatibility, and (2) it's easier to grasp, I think, and does solve most problems.

Jon
Sonny Software
Post Reply