mIRC Home    About    Download    Register    News    Help

Page 1 of 2 1 2 >
Topic Options
#38562 - 27/07/03 12:15 PM /sockread help
ScatMan Offline
Hoopy frood

Registered: 06/05/03
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

Top
#38563 - 27/07/03 12:23 PM Re: /sockread help
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
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.

Top
#38564 - 27/07/03 12:35 PM Re: /sockread help
ScatMan Offline
Hoopy frood

Registered: 06/05/03
Posts: 730
anyone ?

Top
#38565 - 27/07/03 03:03 PM Re: /sockread help
LocutusofBorg Offline
Hoopy frood

Registered: 23/03/03
Posts: 1271
Loc: Sunnydale, CA
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

Top
#38566 - 27/07/03 05:34 PM Re: /sockread help
tomalak16 Offline
Vogon poet

Registered: 24/12/02
Posts: 109
Loc: UK
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"

Top
#38567 - 27/07/03 07:07 PM Re: /sockread help
LocutusofBorg Offline
Hoopy frood

Registered: 23/03/03
Posts: 1271
Loc: Sunnydale, CA
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

Top
#38568 - 27/07/03 07:19 PM Re: /sockread help
ScatMan Offline
Hoopy frood

Registered: 06/05/03
Posts: 730
do u know how it works in /sockread ?

Top
#38569 - 27/07/03 07:54 PM Re: /sockread help
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
I still don't have a clue what kind of answer you're looking for.
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#38570 - 27/07/03 08:40 PM Re: /sockread help
LocutusofBorg Offline
Hoopy frood

Registered: 23/03/03
Posts: 1271
Loc: Sunnydale, CA
/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

Top
#38571 - 27/07/03 08:43 PM Re: /sockread help
ScatMan Offline
Hoopy frood

Registered: 06/05/03
Posts: 730
yes.. but the question was 'how the evaluation there works' and that's all i want to know

Top
#38572 - 27/07/03 10:32 PM Re: /sockread help
LocutusofBorg Offline
Hoopy frood

Registered: 23/03/03
Posts: 1271
Loc: Sunnydale, CA
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

Top
#38573 - 27/07/03 10:41 PM Re: /sockread help
ScatMan Offline
Hoopy frood

Registered: 06/05/03
Posts: 730
u don't know what i meant.. nevermind, thx anyway
if someone else know what i meant so plz help me


Top
#38574 - 28/07/03 12:57 AM Re: /sockread help
codemastr Offline
Hoopy frood

Registered: 12/12/02
Posts: 2809
No, we don't know what you meant, thats why he said to restate your question in a way people can understand it!

Top
#38575 - 28/07/03 07:56 AM Re: /sockread help
LocutusofBorg Offline
Hoopy frood

Registered: 23/03/03
Posts: 1271
Loc: Sunnydale, CA
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

Top
#38576 - 28/07/03 09:54 AM Re: /sockread help
ScatMan Offline
Hoopy frood

Registered: 06/05/03
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 ?


Top
#38577 - 28/07/03 10:08 AM Re: /sockread help
LocutusofBorg Offline
Hoopy frood

Registered: 23/03/03
Posts: 1271
Loc: Sunnydale, CA
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

Top
#38578 - 28/07/03 10:22 AM Re: /sockread help
ScatMan Offline
Hoopy frood

Registered: 06/05/03
Posts: 730
what is so hard to understand ??????????????????

Top
#38579 - 28/07/03 10:24 AM Re: /sockread help
LocutusofBorg Offline
Hoopy frood

Registered: 23/03/03
Posts: 1271
Loc: Sunnydale, CA
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

Top
#38580 - 28/07/03 10:34 AM Re: /sockread help
ScatMan Offline
Hoopy frood

Registered: 06/05/03
Posts: 730
ok,
sockread %a $+ b
it won't work, why ?


Top
#38581 - 28/07/03 11:20 AM Re: /sockread help
guesseyder Offline
Ameglian cow

Registered: 08/02/03
Posts: 47
Loc: Holland
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)

Top
Page 1 of 2 1 2 >