Skip to main content
added 15 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

#MATL, 10 bytes

`1[]T3$Z#T

###Explanation

This is an infinite loop that writes number 1 to a file called inout in current directory, overwriting previous file's contents.

`       % do...while loop
  1     %   push number 1
  []    %   push empty array
  T     %   push "true"
  3$Z#  %   fwrite function. First input is file content. Second is file name;
        %   defaults to "inout" if empty. Third indicates that any previous
        %   file contents should be discarded
  T     %   push "true".: loop condition 
        % implicitly end loop. Loop condition is "true", so the loop is infinite

#MATL, 10 bytes

`1[]T3$Z#T

###Explanation

This is an infinite loop that writes number 1 to a file called inout in current directory, overwriting previous file's contents.

`       % do...while loop
  1     %   push number 1
  []    %   push empty array
  T     %   push "true"
  3$Z#  %   fwrite function. First input is file content. Second is file name;
        %   defaults to "inout" if empty. Third indicates that any previous
        %   file contents should be discarded
  T     %   push "true". 
        % implicitly end loop. Loop condition is "true", so the loop is infinite

#MATL, 10 bytes

`1[]T3$Z#T

###Explanation

This is an infinite loop that writes number 1 to a file called inout in current directory, overwriting previous file's contents.

`       % do...while loop
  1     %   push number 1
  []    %   push empty array
  T     %   push "true"
  3$Z#  %   fwrite function. First input is file content. Second is file name;
        %   defaults to "inout" if empty. Third indicates that any previous
        %   file contents should be discarded
  T     %   push "true": loop condition 
        % implicitly end loop. Loop condition is "true", so the loop is infinite
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

#MATL, 10 bytes

`1[]T3$Z#T

###Explanation

This is an infinite loop that writes number 1 to a file called inout in current directory, overwriting previous file's contents.

`       % do...while loop
  1     %   push number 1
  []    %   push empty array
  T     %   push "true"
  3$Z#  %   fwrite function. First input is file content. Second is file name;
        %   defaults to "inout" if empty. Third indicates that any previous
        %   file contents should be discarded
  T     %   push "true". 
        % implicitly end loop. Loop condition is "true", so the loop is infinite