Convert ASCII code to equivalent numerical value

new topic     » topic index » view thread      » older message » newer message

given:

integer key

key = wait_key

If the key pressed is 1, then the value in key = 49.
I need a value of 1.
I could say:
key -= 48
Is there a more sanitary way?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu