While investigating an error executing a table formula I discovered that
cells containing '$' cause column references to be executed even when no
attempt is made to evaluate cell contents as code. Here's a simple example:

#+TITLE: demonstrate strange error in currency column

| 3/1/2023  | Deposit                | $200.00 |
| 3/13/2023 | Interest               | $1.13   |
| 4/1/2023  | Deposit                | $301.22 |
|-----------+------------------------+---------|
|           | Number of Transactions |         |
#+TBLFM: @4$3='(length '(@1$3..@I$3))

Evaluating the table formula produces a 'Invalid field specifier "$200"'
message. In more complicated examples you just see a #ERROR in the cell.
With formula debugging turned on, I can evaluate the expanded expression
with no errors.

This is surprising for a number of reasons:

   1. The formula makes no use of the cell contents
   2. The formula debugger notes an error but actually shows a valid
   expression
   3. Columns with currencies will be fairly common esp in imports from
   financial institutions
   4. This error happens before the formula is evaluated so there is no
   chance to remove the problem character in the formula as I do with the
   commas ',' which are also present

Is this by design? If so, I was unable to find any documentation explaining
it.

Thanks,
Jeff

Reply via email to