renata12345
Instructor
Hi there!
I'm trying to use the copy_stream_data predicate to copy user's input to a file.
The syntax is:
copy_stream_data(+StreamIn, +StreamOut)
So,SreamIn is the standard user input(the screen) and StreamOut I want it to be the file mytext.txt.
When i try writing copy_stream_data(user_input, 'mytext.txt') it gives me the following error:
ERROR: copy_stream_data/2: stream `mytext.txt' does not exist
what is it that i'm doing wrong??
I 'd really appreciate your help.
Renata.
I'm trying to use the copy_stream_data predicate to copy user's input to a file.
The syntax is:
copy_stream_data(+StreamIn, +StreamOut)
So,SreamIn is the standard user input(the screen) and StreamOut I want it to be the file mytext.txt.
When i try writing copy_stream_data(user_input, 'mytext.txt') it gives me the following error:
ERROR: copy_stream_data/2: stream `mytext.txt' does not exist
what is it that i'm doing wrong??
I 'd really appreciate your help.
Renata.