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.

Binary values retained in text string

Featured Replies

  • Newbies

I need to create a text string that will be used as a command to a serial I/O device. Content includes such things as: a command code e.g. Hex 60; a calculated length field,with the 8 least significant bits stored in one byte and the next 8 significant bits stored in another; and a byte that contains the cumulative XOR of all the preceding bytes. I figured out how to do the XOR thanks to a forum entry here, but when I try to build my text string, the numbers are converted to ASCII, e.g. the hex 60 (decimal 96) displays as two bytes with a value of 9 and 6, instead of one byte. Since the length must be calculated each time, I cannot use constants in the bytes. How do I get the right values in the bytes?

FileMaker doesn't have a way to convert a number directly into its ascii code, you would need to make your own version of this.

One easy way I've done something similar is to have a global field (charCode) with 256 repetitions. Then use GetRepetition( charCode, 96 ) to give you the proper character for 96.

  • Author
  • Newbies

Thanks, Shadow, you made my day.

  • Author
  • Newbies

Any suggestion for entering values into this array? I set it up as a table of its own instead of a repeating field, since it was easier to enter the data if I knew from the related numeric key which field I was entering. I have tried entering field values with the Alt key plus numeric key pad. All worked fine except the null (00), tab (09), line feed (0D), new record (0A). I also tried generating a tab-delimited file from a program that does allow bitwise manipulation of bytes. This worked fine except for some of the same characters, which of course were interpreted as delimiters and other non-data by the FM import function. I am going to need every value since they will be used to indicate calculated lengths, which may well be 9, 10, 12 or 13.

Option-tab (maybe ctrl-tab on windows??) lets you enter a real tab into a field, otherwise you can cut/paste it from another app.

I think 0D/0A is going to be a problem, Pro is probably going to try to translate these to what your system uses when you output them, and translate to an internal form on input.

Similarly for 00, I doubt there is a way to enter this value directly.

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.