【问题标题】:How to include spaces in file names in GForth (GNU Forth)?如何在 GForth (GNU Forth) 中的文件名中包含空格?
【发布时间】:2013-04-04 12:23:57
【问题描述】:

当我尝试在 Unix(和 Windows)上包含一个文件时,当它包含空格时它将不起作用。例如,这些不起作用:

include ~/Space Folder/test.fs
include ~/Space\ Folder/test.fs
include "~/Space Folder/test.fs"
include "~/Space\ Folder/test.fs"
include C:\Users\Lim Ding Wen\test.fs
include C:\Users\Lim/ Ding/ Wen\test.fs
include "C:\Users\Lim Ding Wen\test.fs"

那么.. 有没有办法让这个工作?谢谢!

【问题讨论】:

  • 尝试将~ 替换为主目录的路径。它是执行变量扩展的 shell。
  • @devnull 适用于 Unix,但不适用于 Windows。
  • 您是否尝试在 Windows 上转义 \,即使用 \\?

标签: windows macos unix forth gforth


【解决方案1】:

使用included 字:

s" My File With Spaces.fs" included

波浪号扩展可能不起作用(尚未测试)。如果不指定绝对路径,那么文件需要在GFORTHPATH

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-07-05
    • 2020-01-25
    • 2021-01-09
    • 1970-01-01
    • 2017-10-25
    • 2017-01-13
    • 2011-11-20
    • 2010-09-28
    相关资源
    最近更新 更多