I have a question about the following statement in tcl
set hello [format %x [expr { 2**($D - 1)}]]
the proc takes $D as a parameter, I pass it as 1, but it complains syntax error in expression ” 2**($D – 1)”: unexpected operator *
can anyone helps?
Older versions of Tcl do not have an exponentiation operator **. You will need to use the pow function.
Do note that
pow()returns a floating-point value