Skip to content

Commit

Permalink
Merge pull request #9 from PESchoenberg/develop
Browse files Browse the repository at this point in the history
Modified comments.
  • Loading branch information
PESchoenberg authored May 28, 2019
2 parents da751e7 + faf6611 commit b478038
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ and filled with comments.

* URL of this project - https://github.com/PESchoenberg/grsp.git

Please let me know if I forgot to add any credits or sources.


## License:

Expand Down
24 changes: 22 additions & 2 deletions grsp0.scm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
strings-append
read-file-as-string
grsp-lang-effective-version
grsp-test))
grsp-test
qrsp-save-to-file))


; pline - displays character p_n p_m times in one line at the console.
Expand Down Expand Up @@ -187,9 +188,28 @@
res))


; grsp-test - a simple test fnction.
; grsp-test - a simple test function.
;
(define (grsp-test)
(display "grsp-test"))


; qrsp-append-to-file - saves a string to file p_f.
;
; Arguments:
; - p_s: string to save.
; - p_f: file.
; - p_m: save mode.
; - "w": open for input. Rewrite if exists.
; - "a": open for append. Create if does not exist.
;
; Sources;
; - https://www.gnu.org/software/guile/manual/html_node/File-Ports.html
;
(define (qrsp-save-to-file p_s p_f p_m)
(let ((output-port (open-file p_f "a")))
(display p_s output-port)
(newline output-port)
(close output-port)))


0 comments on commit b478038

Please sign in to comment.