text in if statements

text in if statements - Messages

#1 Posted: 5/1/2019 5:40:54 PM
The Cross

The Cross

0 likes in 73 posts.

Group: User

Can text be included in an if statement? For example:
If "Thin-walled pipe anchored throughout" then P=1-v.

I have various conditions that different formulas would be used depending on the conditions, see below.restraints.png
#2 Posted: 5/1/2019 6:24:24 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1675 posts.

Group: User

Hi. You have some options for do that. Here are two:
Clipboard01.gif
Best regards.
Alvaro.
#3 Posted: 5/1/2019 10:04:46 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

You have some options for doing that.


Easy to complete the conditions, thus the project.
Cheers Alvaro ... Jean

str.PNG

#4 Posted: 5/2/2019 5:41:07 PM
The Cross

The Cross

0 likes in 73 posts.

Group: User

I don't understand how to input the data into the statement. If I press the space key, the input ends, and I cannot input anything.
#5 Posted: 5/2/2019 5:47:44 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I don't understand how to input the data into the statement.
If I press the space key, the input ends, and I cannot input anything.


There is no space key to press. Construct the snippet, done.
#6 Posted: 5/2/2019 6:04:03 PM
The Cross

The Cross

0 likes in 73 posts.

Group: User

Sorry, I have never constructed a snippet before. How do I do that?
#7 Posted: 5/2/2019 7:05:13 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Sorry, I have never constructed a snippet before. How do I do that?


Construct the math regions as per the image that we call snippet.
#8 Posted: 5/3/2019 10:15:42 AM
The Cross

The Cross

0 likes in 73 posts.

Group: User

I tried to construct it. My question is how to do that. I try and the below is what happens:if statement.png
#9 Posted: 5/3/2019 1:09:07 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

g(str,x):=then from menu f(x), then cases, then fill-in
#10 Posted: 5/3/2019 2:11:45 PM
fedeghi

fedeghi

25 likes in 112 posts.

Group: User

The cases() function is included into the "custom functions" plugin, so you should also be sure to have it installed.

Cattura.PNG
1 users liked this post
frapuano 5/3/2019 2:38:00 PM
#11 Posted: 5/3/2019 4:16:46 PM
The Cross

The Cross

0 likes in 73 posts.

Group: User

Wrote

The cases() function is included into the "custom functions" plugin, so you should also be sure to have it installed.

Cattura.PNG



Thank you. I had the "custom functions" plugin installed, but the use of it is not in any of the manuals, at least not that I could find. I had no idea I had to type the word "cases" to get to the input.
#12 Posted: 5/3/2019 4:19:43 PM
The Cross

The Cross

0 likes in 73 posts.

Group: User

Wrote

g(str,x):=then from menu f(x), then cases, then fill-in



Thank you. I understand now.
#13 Posted: 5/3/2019 5:37:20 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I had no idea I had to type the word "cases"


only click the function 'cases' from the f(x) menu.
In the right most place holder of the first 'if'
place the cursor type coma, coma [,,]
that gives another line of conditions ... and so on.
#14 Posted: 5/3/2019 5:48:24 PM
The Cross

The Cross

0 likes in 73 posts.

Group: User

Wrote

Wrote

I had no idea I had to type the word "cases"


only click the function 'cases' from the f(x) menu.
In the right most place holder of the first 'if'
place the cursor type coma, coma [,,]
that gives another line of conditions ... and so on.



Thank you. I was trying to figure out how to do that.
#15 Posted: 5/7/2019 1:15:44 PM
The Cross

The Cross

0 likes in 73 posts.

Group: User

Wrote

Wrote

You have some options for doing that.


Easy to complete the conditions, thus the project.
Cheers Alvaro ... Jean

str.PNG



I use the cases function to type everything in, but when I go back to the first line that says "x if str", as soon as I type "x if str =, as soon as I type the = sign, I get "x not defined". I am trying to understand, but not getting it yet. I had it almost working, but then this glitch appeared.
#16 Posted: 5/7/2019 1:39:45 PM
The Cross

The Cross

0 likes in 73 posts.

Group: User

Wrote

Wrote

Wrote

You have some options for doing that.


Easy to complete the conditions, thus the project.
Cheers Alvaro ... Jean

str.PNG



I use the cases function to type everything in, but when I go back to the first line that says "x if str", as soon as I type "x if str =, as soon as I type the = sign, I get "x not defined". I am trying to understand, but not getting it yet. I had it almost working, but then this glitch appeared.



I figured out how I did it before. I cannot type the = in the above, but it works with a :=. But it does not really work, because if I say str:="b" and x:=7, the answer is 21.99 instead of 14, but it does allow me to type it. I am confused.
#17 Posted: 5/7/2019 2:54:10 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I figured out how I did it before. I cannot type the = in the above, but it works with a :=. But it does not really work, because if I say str:="b" and x:=7, the answer is 21.99 instead of 14, but it does allow me to type it. I am confused.



Equality.PNG

#18 Posted: 5/7/2019 3:18:13 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Wrote

Wrote

Wrote

Wrote

You have some options for doing that.


Easy to complete the conditions, thus the project.
Cheers Alvaro ... Jean

str.PNG



I use the cases function to type everything in, but when I go back to the first line that says "x if str", as soon as I type "x if str =, as soon as I type the = sign, I get "x not defined". I am trying to understand, but not getting it yet. I had it almost working, but then this glitch appeared.



I figured out how I did it before. I cannot type the = in the above, but it works with a :=. But it does not really work, because if I say str:="b" and x:=7, the answer is 21.99 instead of 14, but it does allow me to type it. I am confused.



Please post the worksheet or a screenshot. In the second column of cases you have to use boolean equals, not the assignment operator.

You can find the boolean operators in one of the palettes on the right of your screen, hovering the mouse hover the symbols you should see the keyboard shortcut.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#19 Posted: 5/7/2019 3:26:07 PM
The Cross

The Cross

0 likes in 73 posts.

Group: User

Wrote

Wrote

I figured out how I did it before. I cannot type the = in the above, but it works with a :=. But it does not really work, because if I say str:="b" and x:=7, the answer is 21.99 instead of 14, but it does allow me to type it. I am confused.



Equality.PNG



thank you. I can't use the "Thank" button because every time I do, it says "error occurred"
#20 Posted: 5/7/2019 3:31:51 PM
The Cross

The Cross

0 likes in 73 posts.

Group: User

Wrote

Wrote

I had no idea I had to type the word "cases"


only click the function 'cases' from the f(x) menu.
In the right most place holder of the first 'if'
place the cursor type coma, coma [,,]
that gives another line of conditions ... and so on.



How do I remove a line. I tried backspacing, and it did not work.
  • New Posts New Posts
  • No New Posts No New Posts