Skip to content

Instantly share code, notes, and snippets.

@lelandrichardson
Created August 27, 2020 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lelandrichardson/5f69f4bf4af7169a59ac0596c4f08358 to your computer and use it in GitHub Desktop.
Save lelandrichardson/5f69f4bf4af7169a59ac0596c4f08358 to your computer and use it in GitHub Desktop.
fun Address(
$composer: Composer,
$static: Int,
number: Int, street: String,
city: String, state: String, zip: String
) {
Text($composer, ($static and 0b11) and (($static and 0b10) shr 1), "$number $street")
Text($composer, ($static and 0b100) shr 2, city)
Text($composer, 0b1, ", ")
Text($composer, ($static and 0b1000) shr 3, state)
Text($composer, 0b1, " ")
Text($composer, ($static and 0b10000) shr 4, zip)
}
@ycmjason
Copy link

I agree @ShreckYe. I got a little confused when trying to understand too. Thanks for pointing this out! @lelandrichardson can you confirm please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment