records on F# using Xamarin Studio on MacOS: syntax error ?

15 views
Skip to first unread message

FG R

unread,
Nov 17, 2016, 4:26:40 AM11/17/16
to F# Discussions

I am using Xamarin Studio 6.1.2 on MacOS

I just want to define a record type in F# interactive

if I type the following it's ok

type ComplexNumber = { real: float; imaginary: float };;

 type ComplexNumber =
   {real: float;
    imaginary: float;}
  


however if i try to do the same definition but written in several lines, i get an error

type ComplexNumber = { 
                       real: float ;
                       imaginary: float ;
                      }
;;
 Unexpected symbol '}' in interaction at 3,22
 parse error at 3,22
  


I don't think it's supposed to be this way.

is this a problem with Xamarin Studio, or is my syntax wrong ?

thanks

Jason Imison

unread,
Nov 17, 2016, 4:31:05 AM11/17/16
to fsharp-o...@googlegroups.com
type A =
  {
     real:float
     imaginary:float
  };;
 type A =
   {real: float;
    imaginary: float;}

This works

--
--
To post, send email to fsharp-opensource@googlegroups.com
To unsubscribe, send email to
fsharp-opensource+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/fsharp-opensource
---
You received this message because you are subscribed to the Google Groups "F# Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fsharp-opensource+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

FG R

unread,
Nov 17, 2016, 5:51:41 AM11/17/16
to F# Discussions
thank you, so basically, we don't need the semi columns in F# interactive

however we still need them in the F# source files right ?

--
--
To post, send email to fsharp-o...@googlegroups.com

To unsubscribe, send email to

For more options, visit this group at
http://groups.google.com/group/fsharp-opensource
---
You received this message because you are subscribed to the Google Groups "F# Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fsharp-opensou...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages