Yet another question: How to measure the length of a given string

Peter Quain pquain at une.edu.au
Sun Oct 2 22:03:07 UTC 2011


Gilis

Look in e-basic help for String Functions. You are after "Len":

Your input box content will be stored in a variable ... say strInBx.

If Len(strInBx) < 2 Then
... commands to return InputBox to screen, and tell subject not to be 
so lazy ..
End If
---------------------
Len, LenB (functions)
-------------------
Syntax

Len(expression)
LenB(expression)

Description

Returns the number of characters (for Len) or bytes (for LenB) in 
String expression or the number of bytes required to store the 
specified variable.
------------------------

At 04:36 AM 3/10/2011, you wrote:
>Hi again and sorry for keeping you busy...
>
>In my experiment participants write their answers into an inputbox,
>the inputbox fade and the next trail start after the participant press
>enter.
>My question, in fact questions, is how I can make sure that the
>participant entered his or her answer into the inputbox. One idea that
>I had is to count the length of the string from the input box and if
>it's <2 (because obviously no word can be written with less than 2
>letters) the inputbox will remain visible until a valid answer is
>provided. The problem is that I can't find the right commands in
>eprime that do such thing. There are no commands like length and count
>that could help in this, so again, any help would be welcomed. More, I
>don't know how to tell to the input box to wait until there are at
>least 2 letters in it.
>
>Regards,
>Gilis
>
>--
>You received this message because you are subscribed to the Google 
>Groups "E-Prime" group.
>To post to this group, send email to e-prime at googlegroups.com.
>To unsubscribe from this group, send email to 
>e-prime+unsubscribe at googlegroups.com.
>For more options, visit this group at 
>http://groups.google.com/group/e-prime?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list