Page 1 of 1

Question about concatenating strings

Posted: Wed Apr 25, 2018 8:49 am
by mjavid
Hello,

When a user runs the code below in EViews 10 and enters 0209 when asked by the dialog box, the first two prompts show the expected messages (02: and :02, respectively). The next final two prompts, however, both show "a" as the message, when the expected messages are "a:" and ":a"

@uidialog("edit", %mmyyfirst, "Enter 0209",4)

@uiprompt(@left(%mmyyfirst,2)+":")
@uiprompt(":"+@left(%mmyyfirst,2))

@uiprompt(@left(%mmmyyfirst,2)+"a")
@uiprompt("a"+@left(%mmmyyfirst,2))

Re: Question about concatenating strings

Posted: Wed Apr 25, 2018 8:56 am
by EViews Gareth
I don't understand why you would think they would be "a:".

The final set of prompts are using the undefined %mmmyyfirst. Perhaps that is a typo and it should be %mmyyfirst, but even then the result would not be "a:"

Re: Question about concatenating strings

Posted: Wed Apr 25, 2018 9:23 am
by mjavid
My mistake, I meant to write "02a" and "a02", not "a:" and ":a".

"%mmmyyfirst" is a typo and it explains why my program wasn't working. Silly error on my part. Thanks for your help!