Page 1 of 1

Difference between $ and ~?

Posted: Thu Jun 15, 2006 8:59 am
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

Posted: Thu Jun 15, 2006 11:23 am
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

Posted: Thu Jun 15, 2006 11:55 am
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

Posted: Thu Jun 15, 2006 12:49 pm
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