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.

Help? Operator "^" ceases to function in FM7.0.2

Featured Replies

Check this out :

Where "Index" = 3

FM 6 : 10^((Index-1)*7) WORKS! = Returns "100,000,000,000,000"

FM 7 : 10^((Index-1)*7) FAILS! = Returns "1.0e+14"

FM 7 : 9^((Index-1)*7) WORKS = Returns "22,876,792,454,961"

Are there any maths bofins out there who understand why it no longer works in FM 7?

1.0e+14 is scientific notation for 100,000,000,000,000.

You can change the formatting on your layout to choose how it displays.

  • Author

Hey Shadow, thanks, I get the reasoning for the resulting formula, I just don't understand WHY FM is behaving like a $1 two battery calculator and freaking out after the 13th digit, I can actually get it to DISPLAY the 100,000,000,000,000 , BUT when you click IN that field up comes "1.0e+14", and this thing worked perfectly in FM 6? The whole formula is used to generate "0" 's so I can substitute them with blank spaces ( " " ) to emulate tabs in a report that must stack or indent hierarchically.

i.e.

Where Index Level = 3

Substitute(Right(10^((Index Level - 1)*7) ; ((Index Level - 1)*7)) ; "0";" ")

and

10^((Index Level - 1)*7 returns 1.0e+14 (AND SHOULD BE 100,000,000,000,000)

but

9^((Index Level - 1)*7 returns 22,876,792,454,961

can you dig . . .

PS and I AM using FM 7.0.2.....

Why don't you use simple spaces, varying the number according to the index level?

  • Author

(sigh) I suppose there ARE other ways around this problem it's just that I get stuck on 'why the world is not a perfect place' sometimes and FM 7 is SUPPOSED to work it out like FM 6 did, besides I use it this way 'cos I need a LOT of spaces to fleshing out the number to a power and then converting the "0" 's BACK to spaces . . .

Do you have FM Developer 7, if so you could write a simple Custom Function to return a text string of spaces of whatever length you liked. One I have written is given below, it is called "RepeatingString" and takes 2 parameters (Character; StringLength), and basically returns the "Character" repeated "StringLength" number of times, just use the following calc

If ( (Length ( Character ) = 1) and (GetAsNumber ( StringLength ) = StringLength) and (StringLength > 0) ;

Character & RepeatingString ( Character ; StringLength - 1 ) ; "" )

Note the function checks that the Character is of length 1, and that the StringLength is a number greater than 0.

The function is recursive and so calls itself until it can return the right answer, generally I've found this to work very efficiently.

You would use

Set Field ["ListOfSpaces"; "RepeatingString(" "; Index)"]

Or even use this to write your own

"RepeatingSpaces(NoOfSpaces)"

function

Matt

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.