Literal notation question

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
rich
Posts: 81
Joined: 19 November 2015, 12:23 PM

Literal notation question

Post by rich »

I found this literal notation in the High Precision PWM app note. What is the "ZX" notation.
I thought it had to be "&b0000_1100 ?

Const TCCR1A_CLR_MSK as Byte = ZX0000_1100
Const TCCR1B_CLR_MSK as Byte = X1110_0000

Richard
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Literal notation question

Post by dkinzer »

rich wrote:What is the "ZX" notation.
It is a variation of the "BX" notation present in BasicX (you may recall that ZBasic is a superset of BasicX). Both allow the specification of a binary constant, exactly equivalent to using the "&B" notation.

You will find the BX notation described in section 2.6.5 of the ZBasic Reference Manual:
www.zbasic.net/doc/ZBasicRef.php?page=54
- Don Kinzer
rich
Posts: 81
Joined: 19 November 2015, 12:23 PM

Post by rich »

Thanks much

Ricahrd
Post Reply