gkiko10
(Giorgi Kikolashvili)
October 9, 2016, 8:05am
1
I deploy my function in cloud with this command
CloudDeploy[
FormPage[{"one"-> "String", "two" -> "String"},
myFunction[#one, #two] &], Permissions -> "Public"]
myFunction[in1_, in2_] :=
Module[{a, a1, a2, b, b1, b2, b3, b4, b5, result = {}},
...some computations...
result
]
As a result I get this form page
The question is how can I print the steps of myFunction on the webpage? Just giving the final result doesn’t give much information.
Using Print command doesn’t give m the desired result.
seanc
(Sean Clarke)
October 9, 2016, 11:24pm
2
Your function “myFunction ” only returns “result ” and so “result ” is the only thing that will be displayed on the page.
Instead, you probably want it to return a formatted list of outputs:
myFunction[in1_, in2_] :=
Module[{a, a1, a2, b, b1, b2, b3, b4, b5, result = {}},
...some computations...
Column[{something , somethingelse , result}]
]
Print will not work. Beginning programmers should basically just never use Print. It is easily misunderstood. Print doesn’t return anything. It just causes a side effect which here isn’t visible.