mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#38562 27/07/03 11:15 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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

#38563 27/07/03 11:23 AM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
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.
#38564 27/07/03 11:35 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
anyone ?

#38565 27/07/03 02:03 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
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
#38566 27/07/03 04:34 PM
Joined: Dec 2002
Posts: 109
T
Vogon poet
Offline
Vogon poet
T
Joined: Dec 2002
Posts: 109
Quote:
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"
#38567 27/07/03 06:07 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
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
#38568 27/07/03 06:19 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
do u know how it works in /sockread ?

#38569 27/07/03 06:54 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
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.
#38570 27/07/03 07:40 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
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
#38571 27/07/03 07:43 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
yes.. but the question was 'how the evaluation there works' and that's all i want to know

#38572 27/07/03 09:32 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
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
#38573 27/07/03 09:41 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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


#38574 27/07/03 11:57 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
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!

#38575 28/07/03 06:56 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
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
#38576 28/07/03 08:54 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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 ?


#38577 28/07/03 09:08 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
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
#38578 28/07/03 09:22 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
what is so hard to understand ??????????????????

#38579 28/07/03 09:24 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
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
#38580 28/07/03 09:34 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
ok,
sockread %a $+ b
it won't work, why ?


#38581 28/07/03 10:20 AM
Joined: Feb 2003
Posts: 47
G
Ameglian cow
Offline
Ameglian cow
G
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.

Code:
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)

Page 1 of 2 1 2

Link Copied to Clipboard