Mathematica pseudo-types Integer, Real, Rational, Complex String and Symbol and their use.

learn more… | top users | synonyms

64
votes
7answers
6k views

Struct equivalent in Mathematica?

I really miss having something like a struct in Mathematica. I know of (and regularly use) a couple of programming techniques which feel like a ...
23
votes
4answers
1k views

How to create strong types?

In a program I'm writing, I create a list of lists, that looks something like this: {{100, {1,2,3,4,5}}, {105, {2,4,6,8}}, {42, {42,39,56}}} I then pass this ...
12
votes
5answers
688 views

How to check if an expression is a real-valued number

What is a simple, fast way to test whether an expression is a real-valued number? I ask since there is no RealQ function. If we call this test ...
6
votes
2answers
161 views

Get information about a stack of images, without plotting it

A very long time ago I used Mathematica for a few months and found it very intuitive. Now for my work I use MatLab. I was just trying some stuff out with Mathematica again and there is something I ...
6
votes
3answers
160 views

Does there exist any way to add type annotations?

Is there any way to add my own annotations to values or functions in Mathematica? Imagine, for example, that I wanted to annotate a List specifically as a ...
2
votes
3answers
202 views

What format to use to store expressions in database?

I am storing lists of expressions into a MySQL database. Each list is of form {_String, {_String, _Real}, _Real} What data format should each column of the ...
0
votes
1answer
163 views

Mathematica command for type checking?

I have a program where users can enter mathematica commands that can evaluate to any of the standard numeric types (complex, real, int, etc.), or to boolean values. Moreover the users can enter ...
0
votes
1answer
34 views

.NET link - index of property

I have a property in .NET Type, which is actually a generic list of objects. When I try access the property using numeric index e.g. 10, this works. However when I iterate through indices using ...