strange adding
Tobias
tobias.fw at gmail.com
Fri Mar 26 17:37:13 UTC 2010
Sometimes you just get lost too much into your loops. Thanks a lot for
your answer Mich. Actually, I overlooked a loop. The adding of 10 was
actually done 100 times. which just adds 1000 to your numer, hee hee!
On 24 Mrz., 17:54, Michiel Spape <Michiel.Sp... at nottingham.ac.uk>
wrote:
> Hi Tobias,
> Are you sure that this is the exact code you used? For one, if I try to replicate it, with 1 list, and one inline:
> dim newmarker as integer
> newmarker = c.getattrib("Marker")
> newmarker = newmarker + 10
> c.setattrib "MarkerSearch", newmarker
> debug.print c.GetAttrib ("MarkerSearch")
>
> my debug output says 20, which is okay. Secondly, newmarker = newmarker + 10 should say, (if it would be a string operation) 3310 rather than 1033. Still, failing to replicate what you say in there, I can't help much, I'm afraid... For better code, how about this:
>
> dim newmarker as integer
> newmarker = c.getattrib("Marker")
> newmarker = newmarker + 10
> c.setattrib "MarkerSearch", newmarker
>
> becomes
>
> c.SetAttrib "MarkerSearch", cInt(c.GetAttrib("Marker")) + 10
>
> Cheers,
> Mich
>
> Michiel Spapé
> Research Fellow
> Perception & Action group
> University of Nottingham
> School of Psychology
>
> -----Original Message-----
> From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Tobias
> Sent: 24 March 2010 15:57
> To: E-Prime
> Subject: strange adding
>
> Hej there,
>
> I have a rather VB-related problem for a current E-Prime file.
> In a script I want to change an EEG marker according to a certain
> condition:
>
> if condition = 2 then
> dim newmarker as integer
> newmarker = c.getattrib("Marker")
> newmarker = newmarker + 10
> c.setattrib "MarkerSearch", newmarker
> end if
>
> What E-Prime does is as follows: if the marker is 33 it will be 1033
> afterwards. So it "adds" a ten in front of the number. Samewise, if I
> added + 2, it will put a 2 in front of the number. This is strange as
> "newmarker" is an integer.
>
> Even when I use "CInt(c.getattrib("Marker"))" which should turn any
> string into an integer, this doesn't change anything.
>
> Anyway out of here?
> THX,
> Tobias
>
> --
> 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 athttp://groups.google.com/group/e-prime?hl=en.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
--
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