|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
how the evaluation of the variable /sockread works ? it seems that it doesn't work like /set, for example: /sockread %a $+ b /set %a $+ b 1
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Was there really a need to post this twice? Besides, what kind of answer are you expecting here? codemastr gave the answer most people would've in the other thread and you started bitching. If you want to know why they evaluate differently then you should probably email Khaled, I don't think anyone here can give you a definitive answer.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
There you go with the lame attention grabbing again. Ask a question, then wait. Don't post follow ups asking for answers or anything. Then -- go read /help /sockread to see how something works. And if a code you tried didn't work, did you ever consider the possibility that it's not possible? You are trying to do something here that makes no sense whatsoever. /sockread just reads info that a socket receives.
PS: /set %a $+ b 1 is complete nonsense too.
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: Dec 2002
Posts: 109
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 109 |
PS: /set %a $+ b 1 is complete nonsense too. Actually.. it's not. It sets %ab to 1. You'll find that mIRC does NOT evaluate the first parameter of: /set /unset /var /inc /dec ScatMan was wondering why /sockread isn't included in that list, given that the first parameter has the same purpose as in /set. I wonder about /bset ..
<Ingo> I can't uninstall it, there seems to be some kind of "Uninstall Shield"
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
typo on my part. for me it set %a to $+ b 1. missed a /
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
do u know how it works in /sockread ?
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
I still don't have a clue what kind of answer you're looking for.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
/sockread %varname
using /sockread %varname $+ b to create a new variablename by appending the letter b to %varname is pointless, just put the b in %varname and use
/sockread %varnameb
after that you can do whatever you want with %varname/%varnameb
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
yes.. but the question was 'how the evaluation there works' and that's all i want to know
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
sign.
"how the evaluation of the variable /sockread works ?"
/sockread is NOT variable - it's an alias. You can see this because it begins with a / and not with a % (or sometimes a &). Therefor you can not evaluate it, since that is limited to variables and identifiers (those thingies that start with a $)
If you had read the helpfile or read a tutorial, you would know that /sockread %varname dumps the information the socket receives into the variable by the name %varname. From there on, it's a normal variable and you can do whatever the heck you want with it.
Now if this still isn't the answer you want, then think long and hard about how you phrase your questions, as quite obviously -- judging from the lack of response -- none of the scripters on this board understand what you mean then.
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
u don't know what i meant.. nevermind, thx anyway if someone else know what i meant so plz help me
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
No, we don't know what you meant, thats why he said to restate your question in a way people can understand it!
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
I quote myself:
Now if this still isn't the answer you want, then think long and hard about how you phrase your questions, as quite obviously -- judging from the lack of response -- none of the scripters on this board understand what you mean then.
-- try that. Consider how long this has been going on, and if all you hear are people saying the don't klnow what you mean and people giving you not the answer you look for, the problem is obviously in the way the question is asked.....
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
/set %a $+ b 1 will first add %a to b (without evaluating %a) and then put '1' in %ab, so how it works in /sockread ?
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
You already said that. No one understood that. Therefor it is only logical to assume no one will understand it now.
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
what is so hard to understand ??????????????????
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
Your inability to comprehend that no one understands your question. And considering there is one of you saying the question, and three of us saying we don't understand, the problem is not with us but with you. Now either rephrase the question, or stop wasting your time.
DALnet #Helpdesk I hear and I forget. I see and I remember. I do and I understand. -Confucius
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
ok, sockread %a $+ b it won't work, why ?
|
|
|
|
Joined: Feb 2003
Posts: 47
Ameglian cow
|
Ameglian cow
Joined: Feb 2003
Posts: 47 |
WHY it evaluates it differently is probably something only khaled can answer. What has been said earlier is that /sockread is a function call instead of a variable declaration. I've run a little test (below) and that does kinda confirm this.
alias test {
%ab = 1
test1 %a $+ b
}
alias test1 {
echo -a $1
}
the above code echo's "b" to the screen which tells us that %a is evaluated before the letter b is attached to it, meaning $null $+ b which gives b. This is probably similar to what /sockread does although this actually uses the passed variable to store data (hardcoded i assume). If this answer and the above answers do not satisfy you then i suggest you really do email khaled for the reasoning behind this behaviour since he knows the sourcecode of mirc and we do not (or at least i don't)
|
|
|
|
|