DAY 014: ASC
#5
(11-18-2022, 07:19 PM)james2464 Wrote: I noticed this keyword for the first time yesterday while taking a look at a program by Mastergy

_Keydown(Asc("w")) 

Instead of using the number for the w key.
Maybe not for a letter or digit key but how about an arrow key or a strange key that could be seen easily in a keyboard today but wasn't on the original IBM PC keyboard? Pure expert programmer for those that memorize those "VK" codes!


(11-18-2022, 06:49 PM)Pete Wrote: ... Yes, ASC() works with MID$() but if MID$ is not used, ASC() simply converts to a numeric value the first character of the string. The only exception is a null string, which will throw an error.
This is something that I can't explain and even more after there became such a thing as "ASC() statement". I wish on empty string "ASC()" function returned zero, without interrupting program flow. I'm crabbing now because I should have done it to whoever inside M$ was responsible for QuickBASIC and not daring to change it.
Reply


Messages In This Thread
DAY 014: ASC - by SMcNeill - 11-18-2022, 04:31 PM
RE: DAY 014: ASC - by Pete - 11-18-2022, 06:49 PM
RE: DAY 014: ASC - by james2464 - 11-18-2022, 07:19 PM
RE: DAY 014: ASC - by Pete - 11-18-2022, 07:30 PM
RE: DAY 014: ASC - by mnrvovrfc - 11-18-2022, 11:30 PM
RE: DAY 014: ASC - by Pete - 11-19-2022, 12:09 AM
RE: DAY 014: ASC - by Pete - 11-19-2022, 12:14 AM
RE: DAY 014: ASC - by PhilOfPerth - 11-19-2022, 01:09 AM
RE: DAY 014: ASC - by SMcNeill - 11-19-2022, 06:27 AM



Users browsing this thread: 4 Guest(s)