in-line code for rounding decimals

Paul Gr pauls_postbus at hotmail.com
Tue Nov 1 07:54:37 UTC 2005


Hi Leslie,

You can use the Format() function to format all kind of values:

c. setAttrib "meanacc", Format$((counter / 15) * 100, "#.##")

Best,
Paul Groot


>From: Leslie Vaughan <avaughan at email.unc.edu>
>To: eprime at mail.talkbank.org
>Subject: in-line code for rounding decimals
>Date: Mon, 31 Oct 2005 13:06:13 -0500
>
>Hi,
>
>We have feedback in a text display object instead of a feedback display 
>object, and have written in-lines for calculating mean accuracy based on 
>the number of trials in the block:
>
>1) for the counter inline
>
>if numberdisplay.ACC=1 then
>counter=counter+1
>Else
>counter=counter+0
>end if
>
>2) for the calculate inline
>c. setAttrib "meanacc", (counter / 15) * 100
>c.setAttrib "sumcorr", counter
>
>E-prime is giving accuracy with 6 decimal places. What inline code can I 
>use to get it to round to 2 decimal places? Thanks very much, Leslie 
>Vaughan
>



More information about the Eprime mailing list