UDL and hex prefix
-
Notepad++ v8.4.4 x64
I’m trying to create a UDL for a dialect of BASIC. This dialect uses the dollar sign as a prefix for hex numbers.
In the Comment & Number section I have:
Prefix 2: $
Extras 2: A B C D E F a b c d e fHowever this only works for numbers like:
$1
$2
$123These don’t work:
$a
$A
$4b, $48, $46, $43, $40, $3d, $3bWhat am I missing here?
Thanks
-
@Alan-Bourke said in UDL and hex prefix:
$a
$A
$4b, $48, $46, $43, $40, $3d, $3bIf I understand your question correctly, add it to
Extras 1like
described here
-
@Ekopalypse
Thanks, I’ve done that and added ‘,’ in Suffix 2 so that lists of numbers work, however it seems to be having an issue with the letter ‘e’ …
-
Per documentation here:
- Prefix1 and Suffix2 only work with 0-9
- Prefix2 only works with 0-9 and Extras1
- Extras2 only works with 0-9 and Suffix1
To accomplish what I think you want, I would set
- Prefix2 =
$ - Extras1 =
A B C D E F a b c d e f - Operators1 =
,
This will make the comma an operator which doesn’t require spaces. Since comma is an operator in BASIC, this seems reasonable to me. And it allows the comma to be a list separator inside your list of hex numbers
DATA AS BYTE $7f, $82, $85 DATA AS BYTE $bb, $be, $c1 DATA AS BYTE $fe, $fe, $fe

-
@PeterJones said in UDL and hex prefix:
That has cracked it thanks. The ‘e’ issue was because I hadend sub
in Folding style 1 Close, I should have had
‘end sub’
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login