realizată de Janne Ettwig 14 ani în urmă
277
Mai multe ca aceasta
Eprime allows you to declare, but not initialize (assign values to) variables in the User script. This has to be done in the Init script. Constants however have to be initialized immediately.
A function is like a subroutine, but returns a single value of a type you specify
Variables in E-basic:
Example:
Dim age as integer
age = 28 (age + age will return 56)
Other datatypes:
Type declaration:
Type Person
name as String
age as integer
gender as String
End Type
Now you can declare this type like any other variable and access its contents through the “dot notation”
Note: value is assigned directly at declaration, not afterwards as is the case with variables.
Do logic specific to blocks and trials
you can randomize things by dirctly putting it into the code variable = random (min rand no, max rand no) or you can put it in a list and work with c.getAttrib, the plus side when doing this is that it is recorded and you know when what is presented in which trial. Randomisation can be done by putting the list in the ramdom mode. Downside is that it may create a lot of extra trials because every position has to be presented before end of the trial.