Asked — Edited
Resolved Resolved by Rich!

How About A Tutorial On String Variables

I know what strings are and the different types. But, I can't seem to get the handle on the syntax of everything.

I am going to go examine previous EZB files. If there is already a tutorial on the subject point me to it.

Thanks,

Mel


ARC Pro

Upgrade to ARC Pro

Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.

#1  

here ya' go... an example of assigning a string to a variable


$anything="put anything here you want"

#2  

OK, that much I know. What I am looking to find out is how the string works in the weather script. I have changed it so many times that everything is a blur.

Thanks for your help.

#3  

Mel ... look over the examples again... the light bulb will go off soon.... remember the dt app passes the values to ARC.... you do not need to assign data to any of the saved variables... the values loaded into the variables are done by The DT app itself....

Look at My code again in the other thread....

PRO
United Kingdom
#4  

Mel, have a look at my script on the Kangaroo, it shows string manipulation, conversion (to and from decimal etc) and also arrays.

Tony

United Kingdom
#6  

Also have a look at my tutorial on the syntax for data retrieval. Since data is commonly assigned to a variable it should aid you in understanding a little better.

What is it specifically you can't get a handle on? If a variable exists you can use it a million different ways to be honest. If you have a variable called $temperature you can use this in a few different ways;

Say("It is currently "+$temperature+" degrees")

Or


IF($temperature > 21) # I'm British we use centigrade
  Set(D0, On) # Enable relay for fan
  Set(D1, Off) # Disable relay for heater
ElseIf($temperature < 12)
  Set(D0, Off) # Disable relay for fan
  Set(D1, On) # Enable relay for heater
Else
  Set(D0, Off) # Disable relay for fan
  Set(D1, Off) # Disable relay for heater
EndIf

Or

FileWrite("C:\log.txt, $date + " - " + $time + ":" + $temperature)

I could go on and on and on but with no specific topic to cover we could be here for a while.