我有以下代码:
if File.Exists(settingsFilePath) = false then
System.Console.WriteLine("Are you running BlogDotNet for the first time? (yes/no):");
match System.Console.ReadLine() with
| "yes" ->
try
()
with
| :? System.UnauthorizedAccessException -> System.Console.WriteLine("You don't have write permissions on the current directory, please move to another one!")
| :? System.IOException -> System.Console.WriteLine("Couldn't one or more of the create the necessary directories and files, an unknown IO related exception occured")
| "no" -> System.Console.WriteLine("Then you must be running blogctl while in a wrong directory,")
System.Console.WriteLine("please move to the correct directory first before attempting to issue any further blogctl commands")
| _ -> System.Console.WriteLine("Invalid answer, please answer with either 'yes' or 'no'")
else
match List.ofArray (System.Environment.GetCommandLineArgs().[1..]) with
| [""] | ["help"] | ["--help"] | ["-h"] -> ()
| _ -> System.Console.WriteLine("Invalid command or command with invalid arguments, run 'blogctl help' to get a list of the available commands")
System.Console.WriteLine("and information about their usage")
编译器一直抱怨“错误FS0597:连续的参数应该用空格或tupled分隔,涉及函数或方法应用程序的参数应该在最后一行和第12行用括号括起来”。现在您可以在代码中看到上面列出的那些行确实是错误的缩进,但是当我从我的编辑器(Visual Studio代码)复制它们时,它们 正确缩进。我已多次尝试删除缩进并再次缩进它们,无济于事,编译器只是一直在抱怨。当我将2个Console.WriteLine()表达式放在箭头后面的一行上并用分号分隔时,编译器停止抱怨。