The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
44 views

How to check empty tables using SQL Select or Execute?

If[SQLExecute[con, "Select * from TABLE"] == "{}", Print["TRUE"], Print["FALSE"]] I need to know the way, if the TABLE is empty or not
1
vote
2answers
76 views

Returning ancillary computation results from a function

Suppose I want to implement a function to solve a very basic Elliptic problem using Finite Element of some degree (It's just an example). Normally the user of my function is only interested to the ...
7
votes
1answer
196 views

Returning a value from a Module

In the following simple example MyMod := Module[{i}, Do[ Return[1], {i, 3} ]; Print["test"] ] I expected the module to exit on ...
6
votes
1answer
136 views

Return struct from function (with DownValues)

In Mathematica there is a way to create struct-like data type: struct[myField]=value I want to return myStruct from a function: ...
3
votes
2answers
646 views

Function returning Null along with other unexpected expressions

When I use some function, at the end along with the output I get some NULLs returned that I don't understand the reason for and are highly undesirable. For example, when I define the reversal of list ...
11
votes
4answers
629 views

How can I return a Sequence?

Recently I had the need to redefine a certain symbol in my init.m so it would be automatically omitted from any lists it appears in. I decided to redefine it to an empty sequence, e.g. ...
5
votes
4answers
676 views

Compile and “True should be a machine-size real number…” Error

I am trying to compile a little summation function. As far as I understand, because the built-in Sum function can also return ...
22
votes
7answers
3k views

How to avoid returning a Null if there is no “else” condition in an If contruct

I need to use If but with only one option that is if "a" then do "b", else do nothing. So I wrote If[a,b] but the problem is ...