Skip to main content
Commonmark migration
Source Link

#Octave, 13 11 8 bytes

Octave, 13 11 8 bytes

Didn't expect to golf this answer down, but wohoo, a bug(?) in Octave made it possible to save two bytes! :) Converting this to a "full program", instead of a function saves an additional three bytes, leaving us with 8 bytes:

['',833]

['',833] concatenates the empty string with the number 883. The ASCII code for A is 65, so 883 might seem a bit odd. I think this must be a bug, but what Octave does when concatenating an empty string and a number is that it takes the number modulus 256. mod(883, 256) == 65 which just so happens to be the ASCII code for A.

Octave does not do this when using the "proper" method, char(883), in which case we will get:

warning: range error for conversion to character value

#Octave, 13 11 8 bytes

Didn't expect to golf this answer down, but wohoo, a bug(?) in Octave made it possible to save two bytes! :) Converting this to a "full program", instead of a function saves an additional three bytes, leaving us with 8 bytes:

['',833]

['',833] concatenates the empty string with the number 883. The ASCII code for A is 65, so 883 might seem a bit odd. I think this must be a bug, but what Octave does when concatenating an empty string and a number is that it takes the number modulus 256. mod(883, 256) == 65 which just so happens to be the ASCII code for A.

Octave does not do this when using the "proper" method, char(883), in which case we will get:

warning: range error for conversion to character value

Octave, 13 11 8 bytes

Didn't expect to golf this answer down, but wohoo, a bug(?) in Octave made it possible to save two bytes! :) Converting this to a "full program", instead of a function saves an additional three bytes, leaving us with 8 bytes:

['',833]

['',833] concatenates the empty string with the number 883. The ASCII code for A is 65, so 883 might seem a bit odd. I think this must be a bug, but what Octave does when concatenating an empty string and a number is that it takes the number modulus 256. mod(883, 256) == 65 which just so happens to be the ASCII code for A.

Octave does not do this when using the "proper" method, char(883), in which case we will get:

warning: range error for conversion to character value

added 376 characters in body
Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295

#MATLAB#Octave, 1313 11 8 bytes

Didn't expect to golf this answer down, but wohoo, a bug(?) in Octave made it possible to save two bytes! :) Converting this to a "full program", instead of a function saves an additional three bytes, leaving us with 8 bytes:

@()['',88-23]833]

Creates an anonymous function that['',833] concatenates the empty string with the number 88-23883. The ASCII code for A is 65, so 883 might seem a bit odd. I think this must be a bug, but what Octave does when concatenating an empty string and a number is that it takes the number modulus 256. mod(883, 256) == 65 which just so happens to be the ASCII code for A.

Darn it... Didn't know half the solutions used 88-23 to get A. Octave does not do this when using the "proper" method, char(883), in which case we will get:

warning: range error for conversion to character value

#MATLAB, 13 bytes

@()['',88-23]

Creates an anonymous function that concatenates the empty string with the 88-23, which just so happens to be the ASCII code for A.

Darn it... Didn't know half the solutions used 88-23 to get A.

#Octave, 13 11 8 bytes

Didn't expect to golf this answer down, but wohoo, a bug(?) in Octave made it possible to save two bytes! :) Converting this to a "full program", instead of a function saves an additional three bytes, leaving us with 8 bytes:

['',833]

['',833] concatenates the empty string with the number 883. The ASCII code for A is 65, so 883 might seem a bit odd. I think this must be a bug, but what Octave does when concatenating an empty string and a number is that it takes the number modulus 256. mod(883, 256) == 65 which just so happens to be the ASCII code for A.

Octave does not do this when using the "proper" method, char(883), in which case we will get:

warning: range error for conversion to character value

added 83 characters in body
Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295

#MATLAB, 13 bytes

@()['',88-23]

Creates an anonymous function that concatenates the empty string with the 88-23, which just so happens to be tethe ASCII code for A.

Darn it... Didn't know half the solutions used 88-23 to get A.

#MATLAB, 13 bytes

@()['',88-23]

Creates an anonymous function that concatenates the empty string with the 88-23, which just so happens to be te ASCII code for A.

#MATLAB, 13 bytes

@()['',88-23]

Creates an anonymous function that concatenates the empty string with the 88-23, which just so happens to be the ASCII code for A.

Darn it... Didn't know half the solutions used 88-23 to get A.

Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295
Loading