mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
fixes #3901
This commit is contained in:
@@ -2624,6 +2624,12 @@ when not defined(JS): #and not defined(nimscript):
|
||||
elif x > y: result = 1
|
||||
else: result = 0
|
||||
|
||||
when defined(nimscript):
|
||||
proc writeFile*(filename, content: string) {.tags: [WriteIOEffect], benign.}
|
||||
## Opens a file named `filename` for writing. Then writes the
|
||||
## `content` completely to the file and closes the file afterwards.
|
||||
## Raises an IO exception in case of an error.
|
||||
|
||||
when not defined(nimscript) and hostOS != "standalone":
|
||||
when defined(windows):
|
||||
# work-around C's sucking abstraction:
|
||||
|
||||
Reference in New Issue
Block a user