# Assigning hex values

**URL:** <https://clarionhub.com/t/assigning-hex-values/8474>\
**Category:** tips\
**Tags:** language\
**Created:** [August 13, 2025, 8:44am UTC](https://clarionhub.com/t/assigning-hex-values/8474 "2025-08-13T08:44:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RchdR](https://clarionhub.com/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@RchdR](https://clarionhub.com/u/RchdR)\
**Post date:** [August 13, 2025, 8:44am UTC](https://clarionhub.com/t/assigning-hex-values/8474/1 "2025-08-13T08:44:11Z")

</div>

Learnt something new about clarion.

```auto
!Loc:BMI.BMI:bmiColors.rgbRed = FFh !255 - Syntax Error: Unknown Identifier FFh
    Loc:BMI.BMI:bmiColors.rgbRed = 000000FFh !255

```

Anyone know why only a 4 byte hex value so amounts to being a Long, is allowed by the compiler?  
rgbRed is a byte.

---

<div class="post-metadata">

**Author:** ![Mark\_Sarson](https://clarionhub.com/user_avatar/clarionhub.com/mark_sarson/32/6132_2.png) [@Mark\_Sarson](https://clarionhub.com/u/Mark_Sarson)\
**Post date:** [August 13, 2025, 11:13am UTC](https://clarionhub.com/t/assigning-hex-values/8474/2 "2025-08-13T11:13:25Z")

</div>

`FFh` errors because in Clarion, any hex literal starting with A–F must have a leading digit — so `0FFh` is valid. You don’t need all the extra zeroes, just the one at the front. This rule exists so the compiler can tell it’s a number and not a variable or procedure name. Clarion will happily assign it to a BYTE; the compiler doesn’t require it to be “4-byte” long.

Mark

---

<div class="post-metadata">

**Author:** ![RchdR](https://clarionhub.com/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@RchdR](https://clarionhub.com/u/RchdR)\
**Post date:** [August 13, 2025, 1:16pm UTC](https://clarionhub.com/t/assigning-hex-values/8474/3 "2025-08-13T13:16:41Z")

</div>

Yeah, forgot about that one. Probably time to pack it in, too stressed with my situ to concentrate. What a catch 22 to be in.

SWM, the scum of British society.

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [August 13, 2025, 5:15pm UTC](https://clarionhub.com/t/assigning-hex-values/8474/4 "2025-08-13T17:15:47Z")

</div>

An exception to that is when you’re using string literal syntax:

```auto
'<FFh>'

```
