Asked — Edited

Exponential Notation E

I am saving a number in to a variable and when I retrieve the number from the variable it is in exponential notation. Is it possible to tell ARC NOT to do this? The number I am storing is the conversation ID to be sent to a chatbot.

RichardZ


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a new tool that will help unleash your creativity with programming robots in just seconds!

#1  

Richard, can you post of screen shot of your variable and share your code so we can see what is going on?

PRO
USA
#2  

@JustinRatliff:

You can easily reproduce the issue:


$id="2147483647123456"

$str1="id=[" + $id + "]"
print($str1)

if ($str1=="id=[2147483647123456]")
  print("good")
ELSE
  print("wrong")
endif

User-inserted image

PRO
USA
#4  

The only solution I have come up with is to store the word communication with the ID number.

So when I parse the response from the chatbot, instead of just getting the communication ID from the response, I grab the entire &communication=xxxxxxxxxxxxx and store that.

I am sure this will problem will haunt me again. So if anyone has an answer or work around feel free to post it.

Thank you ptp for the clarification.

RichardZ

PRO
USA
#5  

Quote:

What chatbot service requires this?

I believe is botlibre post: https://synthiam.com/Community/Questions/10152

I had that issue in the past, while composing an url with numeric values e.g. session's Id.

There are workarounds like storing letters/symbols in the string to force ARC to handle the value as text.

It's a bug.

I believe is something deeper in the EZ-Script engine e.g. how values are handled.

Another example:


$id="12345"

$str1=$id + " "

$str1=$str1 + "foo"
print($str1)

if ($str1=="12345 foo")
  print("good")
ELSE
  print("wrong")
endif

User-inserted image

PRO
USA
#6  

@rz90208,

Are you happy with botlibre ? It seems much more raw than PandoraBots v1.

PRO
USA
#7  

@Justin I use BotLibre. If you have not heard of it check it out. It is a free service and has a lot of great features. It supports AIML 2.0 and also has its own script language called Self.

The conversation ID for the current conversation. This must not be passed on the first message, but will be returned by the response, and should be used for all subsequent messages in the conversation.

PRO
USA
#8  

@ptp In my opinion, I think it is currently the best one out there. And once you learn the self scripting language the possibilities are endless. On that note its one draw back is its lack of good documentation on the self language. Making it at least for me hard to grasp.