Rank: Advanced Member Groups: Registered
Joined: 12/03/2011(UTC) Posts: 101 Location: Chicago
Was thanked: 16 time(s) in 7 post(s)
|
I have an include file with a bunch of functions and variable definitions in it. Within one of my functions is a 'cases' and a bunch of if/thens that makes it REALLY long. Are better ways to script or format the syntax for something like this? The sheer vertical size of this trips me up sometimes and I need to get my bearigns to navigate it. Thanks Dennis |
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: sinneD Are better ways to script or format the syntax for something like this ? For horizontal, use if/otherwise instead of if/else Open the collapsed area [mapR(x), mapG(x),mapB(x)]. Image Rainbow Colormap [Electron].sm (253kb) downloaded 15 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 12/03/2011(UTC) Posts: 101 Location: Chicago
Was thanked: 16 time(s) in 7 post(s)
|
Jean Giraud-
THANK YOU! that will help me make things so much cleaner. I need to take some time to get my head around the way I have it now to clean up.
Question- at the value of say 64, do the sucessive (32≤x)&(x≤64) and (64≤x)&(x≤96) have a conclict? should one of those terms be a less than instead of a less than or equal too operator?
Dennis |
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: sinneD Question- at the value of say 64, do the sucessive (32â¤x) ... can't tell w/o the document. On top, you complicate matters Can't you mange f(x) ... linterp(X,Y,x) ... or part of the document that produces something.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 12/03/2011(UTC) Posts: 101 Location: Chicago
Was thanked: 16 time(s) in 7 post(s)
|
Jean Giraud-
My question is about the bolean expressions in your example, within the mapR(x) section. Two sucessive expressions have a common intersection point throughout.
1. The upper limit of the first expression is a less than or equal evaluation of a number. 2. The lower limit of the next expression is a greater than or equal to the same number.
What happens when the value for the expression is exactly equal to the number?
I thought only one of the two expressions could be an 'equal to' statement at the same limit point.
Dennis
|
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
... mistakes in the last two posts, deleted. The two segments for interpolation. Dennis.sm (12kb) downloaded 14 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 12/03/2011(UTC) Posts: 101 Location: Chicago
Was thanked: 16 time(s) in 7 post(s)
|
Jean Giraud- Thanks for that explanation. I actually learned a whole bunch more functions from that too! Dennis |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 246 Location: Cali, Colombia Was thanked: 85 time(s) in 65 post(s)
|
Originally Posted by: sinneD I have an include file with a bunch of functions and variable definitions in it. Within one of my functions is a 'cases' and a bunch of if/thens that makes it REALLY long.
Are better ways to script or format the syntax for something like this? The sheer vertical size of this trips me up sometimes and I need to get my bearigns to navigate it.
You can use areas to separate portions of code. As an example, please, look this game that I developed and has a lot of lines of code Regards!
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.