Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.9K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

[Solved] Obtaining attributes weird behavior can anyone explain this?

Posted 5 years ago

Hi still trying to understand Mathematica and working my way through "essentials of programming..."

I am trying to explain the following behaviour.

names= Names["system`*"];

gives me a list of all the names in the system. for example currently names[[3220]] is KochCurve.

If you type either Attributes[KochCurve] or Attributes["KochCurve"] Mathematica spits back

{Protected,ReadProteced}

however if you type

Attributes[names[[3220]]]

Mathematica doesn't play ball and spits out an error message Symbol, string or HoldPattern[symbol] expected at position 1 in ......

but Head[names[[3220]]] is String.

I expect it's something stupid and simple I've not noticed but any clues would be very gladly received.

Chess

POSTED BY: Chess Denman
2 Replies
Posted 5 years ago

Wow, Thank you so much. That works Furthermore your answer was incredibly helpful. Chess

POSTED BY: Chess Denman
POSTED BY: Nikolay Shilov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard