Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Numbers as character strings?

I'm using OpenSesame to run an experiment where I present sentences via RSVP. I have it set up as a series of sketchpads that show words pulled from the experiment loop (e.g. a sketchpad with [word_1], pulling from a column in the loop with the first word of each sentence). Some of the sentences end in numbered dates. OpenSesame automatically recognizes numbers as numbers. This is a problem because with sentences that end in numbers, the period at the end of the sentence gets removed because the program converts "2012." to "2012" , which is not what I want. Is there a way to get OpenSesame to read a number as a character string instead of a number?

Comments

  • eduardeduard Posts: 1,115

    Hi Sophie,

    Unfortunately, this is behaviour is central to many things in Opensesame and as far as I know there is no way, you can make sure your number is interpreted as a string. However, but I think you can bypass the issue, by putting a placeholder into the sentence( e.g. var.sentence = "This is my sentence and it ends with %s.") when you define it. Later, when you put it in the sketchpad, you can then combine the last work and the sentence like this: "[=var.sentence%var.ending]". Like that you should be able to leave the period in there.

    Let me know if it worked.

    Eduard

Sign In or Register to comment.