RSS/Atom feed Twitter
Site is read-only, email is disabled

reading from txt file

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

reading from txt file charlysangel 08 Jul 08:32
2019-07-08 08:32:54 UTC (over 5 years ago)
postings
1

reading from txt file

Hi !

I want to create a multi-layer file by reading from a txt file x/y position and image name.

I've tried to read from file with code below

(let* ((fd (fopen filename))) (let* (
(c (fread 1 fd))
(res "")
)
(while (and c (not (equal? c " "))) (set! res (string-append res c)) (set! c (fread 1 fd)))
(if (equal? res "")
()
(cons (string->number res) ())
)
)
(gimp-message (string-append "PosX: " (number->string res))) )

I do not understand why it returns :"Error: eval: unbound variable: res "

Could you help, please ?