Sign in to follow this  
Guest Real Old Salt

increment and decrement

Recommended Posts

After using these forums for quit some time I've come across a question that I can't find the answer to. The following code works for me but I need it to inc/decrement by 25. Can someone help me with this?(L:APNHgt, feet) -- d 50 < if{ 50 } (>L:APNHgt, feet)(L:APNHgt, feet) ++ d 300 > if{ 300 } (>L:APNHgt, feet)

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

The operator ++ always increments by one.So:(L:var,feet) ++ (>L:var,feet)is idendical to(L:var,feet) 1 + (>L:var,feet)If you want to increment each click with 25, use:(L:var,feet) 25 + (>L:var,feet)SImularly, use(L:var,feet) 25 - (>L:var,feetto decrement with 25.Cheers, Rob Barendregt

Share this post


Link to post
Share on other sites

I needed to retain the minimum and maximum numbers that are in the code.This is how I solved it. Works fine.;(L:APNHgt, feet) 25 - d 50 < if{ 50 } (>L:APNHgt, feet)(L:APNHgt, feet) 25 + d 300 > if{ 300 } (>L:APNHgt, feet)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this