This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Example | |
{ | |
class MainClass | |
{ | |
static void Main() | |
{ | |
Display(0); | |
Display(new A(6)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nowarn "9" | |
let mutate (txt:string) : unit = | |
use ch = fixed txt | |
for i = 0 to txt.Length - 1 do | |
Microsoft.FSharp.NativeInterop.NativePtr.set ch i 'z' | |
let text = "abcd" | |
printfn "%s" text | |
mutate text | |
printfn "%s" text |