[erlang-questions] syntax problem

Grasl Christoph C.Grasl@REDACTED
Tue Apr 22 15:30:55 CEST 2008


hi jb

trying code in a shell reveals a lot, coz:

variables in erlang start with a capital, which leads to a bad match when 
binding values to an atom, so try the following:

CNode=nodes(connected), 
CNode=hd(Nodes),
{any, [CNode]}!{Msgtype,AcReply}.

cheers, 

chris


original message:

Von: erlang-questions-bounces@REDACTED im Auftrag von J Bhanot
Gesendet: Di 22.04.2008 15:13
An: erlang-questions@REDACTED
Betreff: [erlang-questions] syntax problem
 
Hi,


In following code:

 cNode=nodes(connected),  %gives node connected to e6 - should get 
c6@REDACTED here
  cNode=hd(Nodes),
 {any, [cNode]}!{Msgtype,AcReply}.   % have tried it with {any, 
cNode}!{Msgtype,AcReply}. but got the error

I am getting - 
{error,{{badmatch,c6@REDACTED},

but when I am hardcoding it as 

  {any,c6@REDACTED}!{Msgtype,AcReply}.

It is working fine...

What could be the problem in first scenario

Thanking in anticipation

Regards,
jb
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080422/b3902f44/attachment.htm>


More information about the erlang-questions mailing list