doc: use the new jimtcl syntax for 'expr'

With jimtcl 0.81 the syntax of the TCL command 'expr' requires the
multiple arguments to be within curly brackets.

Update the examples in the documentation to follow the new syntax.
While there, split one example to avoid it to exceed the line size
during pdf document generation.

Change-Id: I91cca419f8273415ccb0c2ce369fc6ac476e34e5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6809
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2022-01-12 17:59:12 +01:00
parent aad8718058
commit 5a8d32fcb9
2 changed files with 14 additions and 12 deletions

View File

@@ -174,7 +174,7 @@ them. It is similar to this bash statement.
EXPORT vn=`date`
LINE 2 & 3
set $vn [expr (1024 * $x)]
set $vn [expr {1024 * $x}]
global $vn
In line 1, we dynamically created a variable name. Here, we are