Even in the documentation, there does not seem to be any difference.
You would have seen this (io:fwrite) used in all of the above programs. The fwrite function is part of the ‘io’ module or Erlang, which can be used to output the value of variables in the program. The following example shows a few more parameters which can be used with the fwrite statement.
All Erlang processes have a default standard IO device. This device is used when no IoDeviceargument is specified in the above function calls. However, it is sometimes desirable to use an explicit IoDeviceargument which refers to the default IO device. This is the case with functions that can access either a file or the default IO device.
The ~w is for writing with standard syntax. It can can print any Erlang term. The output can be parsed to return the original Erlang term, unless it contained terms that don't have a parsable written representation, i.e. pids, ports and references.
If you have a tech startup or even a blog that centers around modern technology, the .io domain extension may be for you! It has a natural connection to computer science and can attract all the right attention.
io:fwrite
was introduced as an alias for io:format
, for symmetry with io:fread
, but most people kept using the name format
anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With