Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Why is an arbitrary high number not a good practice?

Featured Replies

Over the years I saw in some answers that the use of an arbitrary high number [like in calculations] could not be a good practice.

Why not? What could/should be the alternative?

While I see in several custom functions the use of it....

Any example of the use of an alternative would be welcome.

A calculation is supposed to implement the logic prescribed by the business rules set for the application. When a calculation uses an arbitrary limit - i.e. a limit not prescribed by the business rules - then it fails to express correctly the required logic.

This has two potentially harmful effects:

  • the limit is arbitrary, therefore confusing to the person reading the code;
  • the limit can be exceeded in some unforeseen circumstances. 

In some cases a very high limit could also increase the time required to process the calculation.

 

3 hours ago, Montana50 said:

Any example of the use of an alternative would be welcome.

A classic example is:

MiddleValues ( listOfValues ; 2 ; 999999999999999 )

The intent here is to remove the first value from  listOfValues - which could be easily accomplished by:

MiddleValues ( listOfValues ; 2 ; ValueCount ( listOfValues ) )

or even better:

RightValues ( listOfValues ; ValueCount ( listOfValues ) - 1 )

But the author was too ignorant or too lazy for that. As a result, the person reading the code started a post here asking:

Quote

I am trying to figure out what the "999999999999999" is doing here in this partial script please

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.