If you don't have it already - I strongly recommend you upgrade to FileMaker Pro Advanced and use the data viewer. In addition you will get a Script Debugger. Can't live without Advanced if you are doing serious development.
If you've got it - open the data viewer and watch your variables as you step through the script with the debugger. Oops - just noticed this is a calc - same thing - you can enter calculations in the data viewer and even parts of calcs (such as the variable) and see what the results are.
If that's not possible, one alternative is to add a Show Dialog script step that displays the variable contents. You could also add a merge variable to the layout and watch it there.
But FMPA will save you hours and hours and hours of time and trouble.
If you have Advanced, make the variable a global variable by prefixing it with $$. Now you can watch and track it in the Data Viewer.
EDIT: I second Karen. If you don't have Advanced, get it.
Is the a way to see what a variable's value is while doing a field calculation?
An example would be useful, I think.
Let ( [$1st = Truncate (DiscriptionData1/12 ; 0) ;
$2nd = DiscriptionData1-($1st * 12) ;
$3rd = Truncate ($2nd/1 ; 0) ;
$4th = Fractions32 ($2nd - $3rd) ;
$5th = $3rd + 1 ] ;
I would like to see how the math is working
How about this way =
Let ( [
step1 = Truncate ( DiscriptionData1 / 12 ; 0 ) ;
step2 = DiscriptionData1 - step1 * 12 ;
step3 = Truncate ( step2 / 1 ; 0 ) ;
step4 = Fractions32 ( step2 - step3 ) ;
step5 = step3 + 1
List ( step1 ; step2 ; step3 ; step4 ; step5 )
This will return a return-separated list of the calculation's progress.