Skip to main content
added 685 characters in body
Source Link

MY BASICBBC BASIC, 29 bytes; BBC BASIC 2729 19 bytes

I have revisited my first answer that I have posted more than 3 years ago and found out that the bytecount could be significantly reduced:

  • -4 bytes thanks to @Neil for the comment he left more than 3 years ago! (Substituting 7 bytes PRINT i with 3 bytes P.i. Note that the alias P. is majuscule.)
  • then again, -4 bytes by doing the analogous replacement of FOR i (5 bytes) with F.i (3 bytes) and NEXT with N.
  • -2 bytes: removal of two spaces
F.i=0TO&A*&A
P.i
N.

MY-BASIC, 32 bytes

for i=0 to 0xa*0xa
print ii;
next

Try it online!Try it online!

Edit: Thanks for upvoting! I have found there is aThis has been my original golf but it has turned out that BBC BASIC dialect withhas an even shorter syntax for hexadecimals (it's in BBC BASIC):

for i=0 to &a*&a
print i
next

that's minus 2 bytesas well as handy for golfing aliases :)

MY BASIC, 29 bytes; BBC BASIC 27 bytes

for i=0 to 0xa*0xa
print i
next

Try it online!

Edit: Thanks for upvoting! I have found there is a BASIC dialect with even shorter syntax for hexadecimals (it's in BBC BASIC):

for i=0 to &a*&a
print i
next

that's minus 2 bytes :)

BBC BASIC, 29 19 bytes

I have revisited my first answer that I have posted more than 3 years ago and found out that the bytecount could be significantly reduced:

  • -4 bytes thanks to @Neil for the comment he left more than 3 years ago! (Substituting 7 bytes PRINT i with 3 bytes P.i. Note that the alias P. is majuscule.)
  • then again, -4 bytes by doing the analogous replacement of FOR i (5 bytes) with F.i (3 bytes) and NEXT with N.
  • -2 bytes: removal of two spaces
F.i=0TO&A*&A
P.i
N.

MY-BASIC, 32 bytes

for i=0 to 0xa*0xa
print i;
next

Try it online!

Edit: Thanks for upvoting! This has been my original golf but it has turned out that BBC BASIC has an even shorter syntax for hexadecimals as well as handy for golfing aliases :)

added 229 characters in body
Source Link

MY BasicBASIC, 29 bytes; BBC BASIC 27 bytes

for i=0 to 0xa*0xa
print i
next

Try it online!

Edit: Thanks for upvoting! I have found there is a BASIC dialect with even shorter syntax for hexadecimals (it's in BBC BASIC):

for i=0 to &a*&a
print i
next

that's minus 2 bytes :)

MY Basic, 29 bytes

for i=0 to 0xa*0xa
print i
next

Try it online!

MY BASIC, 29 bytes; BBC BASIC 27 bytes

for i=0 to 0xa*0xa
print i
next

Try it online!

Edit: Thanks for upvoting! I have found there is a BASIC dialect with even shorter syntax for hexadecimals (it's in BBC BASIC):

for i=0 to &a*&a
print i
next

that's minus 2 bytes :)

added 126 characters in body
Source Link

MY Basic, 29 bytes

for i=0 to 0xa*0xa
print i
next

Try it online!

MY Basic, 29 bytes

for i=0 to 0xa*0xa
print i
next

MY Basic, 29 bytes

for i=0 to 0xa*0xa
print i
next

Try it online!

added 2 characters in body
Source Link
Loading
Source Link
Loading