June 18, 201015 yr Okay, Robin, one of my colleagues, pointed this one out to me. I’ve never run across it before, because…because I’m perfect, and never mistype in the calc engine! Yeah…yeah, that’s it. Anyway, to reproduce: 1.open up the calc engine (Data Viewer will do) 2. Add an expression to the Watch pane, and copy/paste this into the calc dialog: $test $test $test $test $test $test $test 3. Click on Monitor 4. Scratch your head in befuddlement. You’d think FM would bark once you try to commit this expression, since there aren’t any operators…but no. I’ve monkeyed with the contents of the variable to see if anything useful can be done with this (i.e. there’s an obscure reason for it), but nope - tried “1 +”, “test &” etc, putting operators in the string to see if something interesting might come of it. Anyway. Odd. Any ideas or thoughts about this? Am I missing something obvious?
June 18, 201015 yr Hi Colin I think that there is no error because an $var ( and an $$var ) can be named with multiple words. So: $test this test <-- legal variable $test $ test <-- legal variable $test $test <-- legal variable Note that the last two variables can be definited in many ways but NOT with Set Variable [ ] So in your example there is [color:red]ONLY ONE variable and you can SET it for example with a Set Field [ ] script step using the Let ( ) function, something like: Set Field [ YourTable::YourField ; Let ( [color:red]$$test $test $test = $$test $test $test + 1 ; "" ) ] Note that I used an [color:red]$$var so you can see easily the result
June 18, 201015 yr Author Interesting. Yeah, that works if you use a Let statement in a Set Field script step. Note that trying to Set Variable "$test $test” to some value in a script step doesn’t work, because it reads the second $ as an illegal character. This is a bit inconsistent, obviously. Why should the behavior be illegal in one circumstance, and generate NO error in another (and, moreover, WORK)? Moreover, I find it a bit odd that the calc engine interprets return characters as part of the variable name as well. I have a feeling something would break somewhere if you were to choose to declare variables with illegal characters through Set Field. I just don’t know where.
June 18, 201015 yr Note that trying to Set Variable "$test $test” to some value in a script step doesn’t work, because it reads the second $ as an illegal character Isn't it the same as: Note that the last two variables can be definited in many ways but NOT with Set Variable [ ] Moreover, I find it a bit odd that the calc engine interprets return characters as part of the variable name as well Try this: Let([ a = 1 ; b a = 2 + a ]; b a )
June 18, 201015 yr Author Ow. And this is helpful to my brain at 5 o’clock on a Friday...how? ;-) And now I have Abacab in my head, and will have to purge it.
June 18, 201015 yr Author Yep, I just missed that part of your post. Edited June 18, 201015 yr by Guest
June 19, 201015 yr And now I have Abacab in my head, and will have to purge it. Try with solving this quiz: What is the result of this calculation ? ( "mission impossible" - "0" - "1" ) Let([ $test $test = 1 ; $test $test = $test $test - 1 ]; $test $test + $test $test )
June 19, 201015 yr After that quiz, another: Can exist this variable: $$$ : ( Try a button with this step: ) SetField [ YourField ; Let( $$$ = Abs ( $$$ - 1 ) ; $$$ ) ]
June 23, 201015 yr Author This is eerily like those dreams I was having the night before my 11 certification exam.
Create an account or sign in to comment