ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Tips and Tricks
Downloads

Tips and Tricks Share helpful modeling ideas

  #1  
Old 03-28-2014
Sean Browning Sean Browning is offline
Flexsim User
 
Join Date: Oct 2008
Location: Atlanta, GA
Posts: 3
Downloads: 3
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
Sean Browning is on a distinguished road
Default Max Double or Max Int function in Flexscript?

Hi, I'm wondering if there is a way to reference the maximum value for a double in Flexscript. I've used a long string of 9's in the past, but just curious if there was a cleaner way. My other option is to use a global macro, #define statement, so for that I would just need to know the limits for those data types.

Thank you,
Sean
  #2  
Old 03-28-2014
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

A macro is fine - all the integers up to 9007199254740992.0 (2^53) can be represented with a double, but at that point there's no precision left for decimals. After that only the even ones up to 2^53. The integer max is 2147483647.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Sean Browning (03-28-2014)


Thread Thread Starter Forum Replies Last Post
Double Hoist stmyint Container Terminal (CT) Library 5 11-05-2012 04:25 PM
Double Hoist Cranes James Morley Container Terminal (CT) Library 3 10-22-2012 11:40 PM
How to change FlexScript node function luis quinones Tips and Tricks 1 09-14-2010 03:50 AM
C++ function "ceil" in Flexscript Jörg Vogel Q&A 4 10-01-2008 10:17 AM
Double click to execute the onpress function sophia yao Q&A 4 07-15-2008 08:53 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.