MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Head found ;-)


Major mistake ahead:
Symbols don't have Head! They are "terminal symbols" of the Mathematica
language and therefore they have no internal structure per se.
Now I suppose you want to check the Head of the ownvalue of the symbols.
This function returns a List of the names of the wanted symbols:

checkHeads[contxt_String, theHead_]:=
Select[Names[contxt<>"*"],Head[Symbol@#]===theHead&]

The output is a list of Strings (the names of the symbols).
Map the function Symbol to this List to get the Symbols.
Orestis

"Antoine Zahnd" <antoine.zahnd at iprolink.ch> wrote in message
news:9ijhmt$rhn$1 at smc.vnet.net...
> Hi,
>
> How is it possible to return all the symbols ( belonging to the current
> context ),  having a prescribed Head ?
>
> Thank you very much for your help.
>
> antoine.zahnd at iprolink.ch
>
>
>
>




  • Prev by Date: Re: Clearing cache
  • Next by Date: Re: Naming pieces of patterns
  • Previous by thread: Re: Printing Large Base-n Numbers
  • Next by thread: Re: Head found ;-)