"The Result" and "It"

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

"The Result" and "It"

Post by teacherguy »

Is there a tutorial or discussion anywhere regarding the similarities and differences between "the result" and "it"?
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: "The Result" and "It"

Post by Klaus »

No, just what the dictionary states.

the result = a function
IT = a variable
teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: "The Result" and "It"

Post by teacherguy »

OK. Well then for example if I use GET with a URL and then say

put it into myVariable

or

put the result into myVariable

would I expect the same?
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: "The Result" and "It"

Post by Klaus »

I have no idea what you exspect, but I wouldn't exspect the same! :D
Why don't you try this yourself?
...
get url("http://kfjsdlkfjsdklfjsdfkjsdlfkjsdf/indexx.html")
answer "it: " && it & CR & "result:" && the result
...
## or a valid server, but an unvalid page
get url("http://noserver.com/indexx.html")
answer "it: " && it & CR & "result:" && the result
...
## or a valid server, and a valid page
get url("http://runrev.com")
answer "it: " && it & CR & "result:" && the result
....
And SEE the difference!


Best

Klaus
teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: "The Result" and "It"

Post by teacherguy »

Thanks Klaus, this is what I have been working my way through recently in communicating with google docs. I had been careless in the use of "the result" and "it."

So let's see if I have this:

"the result" is empty when we are able to get "it"

and conversely

"the result" will contain some information (from the server?) when get fails and "it" is therefore empty
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: "The Result" and "It"

Post by Klaus »

Yep, something like this... :D
teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: "The Result" and "It"

Post by teacherguy »

Thanks Klaus, you are always very patient and helpful.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: "The Result" and "It"

Post by Klaus »

You should see my monthly bills for "Valium"! :lol:
Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: "The Result" and "It"

Post by Dixie »

:D :D
Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: "The Result" and "It"

Post by Thierry »

Klaus wrote:You should see my monthly bills for "Valium"! :lol:
Does it really work ? :roll:

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: "The Result" and "It"

Post by Klaus »

Thierry wrote:Does it really work ? :roll:
Thierry
Not really, but at least it deters me from getting abusive! 8)
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: "The Result" and "It"

Post by jacque »

teacherguy wrote: So let's see if I have this:

"the result" is empty when we are able to get "it"

and conversely

"the result" will contain some information (from the server?) when get fails and "it" is therefore empty
Well, not always. They contain different types of info. In an ask dialog, for example, the result will contain the name of the button clicked and "it" will contain the text the user enters.

The result generally contains error info (but there are exceptions.) The "it" variable generally contains data retrieved from a source.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: "The Result" and "It"

Post by teacherguy »

Thanks Jacque. Yes I've noticed that when I query google docs "it" will sometimes include errors (like failure to authenticate). So that is when I started thinking that "the result" and "it" were the same thing.
Post Reply