Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2762

Eval rounds automatically

    XMLWordPrintable

    Details

      Description

      bundle agent main
      {
        vars:
      
            "WTF" string => eval( "1 * .75", "math", "infix"); 
            "TF" string => eval( "1 * 0.75", "math", "infix"); 
      
        reports:
      
            "$(WTF) == $(TF)";
      }
      
      : R: 1.000000 == 0.750000
      

      All the math is done with the C double type internally. The results are returned as a string. When the mode is math the returned value is a floating-point value formatted to 6 decimal places as a string.

      https://docs.cfengine.com/docs/3.10/reference-functions-eval.html

        Attachments

          Activity

            People

            • Assignee:
              vpodzime Vratislav Podzimek
              Reporter:
              a10042 Nick Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel