Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

17. Trace BIFs, the dbg Tracer, and Matc... > Match Specifications: The Nuts and B...

Match Specifications: The Nuts and Bolts

When covering the help function dbg:fun2ms/1, we went into a high-level explanation of its results, namely match specifications. The specifications are tuples with three elements of the format [Head, Conditions, Body]:

  • The head is used to bind and match variables and terms.

  • In the conditions, logical tests are applied on the variables. You can define your own logical tests or use predefined guards.

  • In the body part of the specification, we list a possibly empty set of predefined actions that have to be taken if the match in the head is successful and the logical conditions are met.

The objective of this section is to ensure that you understand the match specifications that result from the dbg:fun2ms/1 and ets:fun2ms/1 calls, and possibly implement some simpler ones for yourself.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint