write (in the context of line types) is a function that allows you to append stuff to a line type. A line is just a pointer to a string. The way write actually works is that it creates a new pointer to a string that is long enough to hold the old data and the new data. Write is defined for all types declared in std.standard (integer, real, bit). For std_logic types you need to use std_logic_textio.
But in VHDL 2008, the function to_string are defined for ALL types in the IEEE packages (and to_hstring, to_bstring and to_ostring for standard array types like std_logic_vector, unsigned etc) which is really nice, so no need to include std_logic_textio anymore.
writeline allows you to write a line type to a text file, and it appends a line feed (LF) character on the end of the line.
The write/read procedure is also defined for files.You can write or read any standard type directly to a file, but its use is simulator dependent, so I wouldnt rely on it. (with this you can actually read and write data files in modelsim via the character type - this allows full file byte access - useful for things like bitmaps).
---------- Post added at 10:38 ---------- Previous post was at 10:35 ----------
Also forgot to add : OUTPUT is a file defined in Textio, which simulators are supposed to use for their console output.
You can also write to output like this (no writeline needed):
write(std.texti
UTPUT, "Hello World!" & LF);
It uses the write to file option I talked about above.