Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #8126 > unrolled thread

Visual Studio Vulcan.Net Unknown Type

Started byGary <gkeefe109@gmail.com>
First post2015-05-22 07:37 -0700
Last post2015-05-29 08:30 -0700
Articles 6 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Visual Studio Vulcan.Net Unknown Type Gary <gkeefe109@gmail.com> - 2015-05-22 07:37 -0700
    Re: Visual Studio Vulcan.Net Unknown Type "Jamal Assaf" <someone@example.com> - 2015-05-22 11:28 -0400
      Re: Visual Studio Vulcan.Net Unknown Type Robert van der Hulst <robert@heliks.nl> - 2015-05-22 20:35 +0200
        Re: Visual Studio Vulcan.Net Unknown Type "Jamal Assaf" <someone@example.com> - 2015-05-22 22:42 -0400
          Re: Visual Studio Vulcan.Net Unknown Type Robert van der Hulst <robert@heliks.nl> - 2015-05-23 14:58 +0200
        Re: Visual Studio Vulcan.Net Unknown Type Gary <gkeefe109@gmail.com> - 2015-05-29 08:30 -0700

#8126 — Visual Studio Vulcan.Net Unknown Type

FromGary <gkeefe109@gmail.com>
Date2015-05-22 07:37 -0700
SubjectVisual Studio Vulcan.Net Unknown Type
Message-ID<9d689b10-0ee8-4d5f-b28e-20192081c87d@googlegroups.com>
Hi,

I am trying to compile and run the following code:


// CodeFile1.prg
#using System

FUNCTION Start() AS VOID

   Console.WriteLine (System.DateTime.Now.ToShortTimeString() )
   Console.ReadKey ()
   RETURN

The error I receive is:

Error 1 'System.DateTime.Now' : unknown type (are you missing an assembly reference?)

This is driving me nuts.  Any suggestions?

Thanks

[toc] | [next] | [standalone]


#8127

From"Jamal Assaf" <someone@example.com>
Date2015-05-22 11:28 -0400
Message-ID<mjnhuh$8p2$1@news.albasani.net>
In reply to#8126
Gary,

It likes a bug in Vulcan.  ToShortTimeString()  is not recognized by the 
vulcan intellisense parser and compiler.

Jamal

"Gary"  wrote in message 
news:9d689b10-0ee8-4d5f-b28e-20192081c87d@googlegroups.com...

Hi,

I am trying to compile and run the following code:


// CodeFile1.prg
#using System

FUNCTION Start() AS VOID

   Console.WriteLine (System.DateTime.Now.ToShortTimeString() )
   Console.ReadKey ()
   RETURN

The error I receive is:

Error 1 'System.DateTime.Now' : unknown type (are you missing an assembly 
reference?)

This is driving me nuts.  Any suggestions?

Thanks 

[toc] | [prev] | [next] | [standalone]


#8130

FromRobert van der Hulst <robert@heliks.nl>
Date2015-05-22 20:35 +0200
Message-ID<555F7706.9080906@heliks.nl>
In reply to#8127
No, definitely NOT a bug.

System.DateTime.Now is a static property of the DateTime structure. This 
returns an Instance of the DateTime structure
ToShortTimeString() is a method of the DateTime structure.

Vulcan uses the ":" operator for method calls on instances, and the "." 
for namespace delimiters and static method calls and static properties

So the correct Vulcan syntax is:

System.DateTime.Now:ToShortTimeString()
^                ^     ^
           a                 b     c

a = Namespace delimiter = Dot
b = Static Property access = Dot
c = Instance method call = Colon

The confusing thing is that C# and VB use Dots for all three, which is 
why the following code could also be a call to the static method 
ToShortTimeString() in the System.DateTime.Now class/structure


Robert

> Gary,
>
> It likes a bug in Vulcan.  ToShortTimeString()  is not recognized by 
> the vulcan intellisense parser and compiler.
>
> Jamal
>
> "Gary"  wrote in message 
> news:9d689b10-0ee8-4d5f-b28e-20192081c87d@googlegroups.com...
>
> Hi,
>
> I am trying to compile and run the following code:
>
>
> // CodeFile1.prg
> #using System
>
> FUNCTION Start() AS VOID
>
>   Console.WriteLine (System.DateTime.Now.ToShortTimeString() )
>   Console.ReadKey ()
>   RETURN
>
> The error I receive is:
>
> Error 1 'System.DateTime.Now' : unknown type (are you missing an 
> assembly reference?)
>
> This is driving me nuts.  Any suggestions?
>
> Thanks
> .
>


-- 
Robert van der Hulst
robert@heliks.nl

[toc] | [prev] | [next] | [standalone]


#8131

From"Jamal Assaf" <someone@example.com>
Date2015-05-22 22:42 -0400
Message-ID<mjopeo$r66$1@news.albasani.net>
In reply to#8130
Hi Robert,

I thought I tried that with : operator. I tried again and it worked. Anyway, 
the intellisense still does not work!
What's worse is the Vulcan compiler confusing error message:
'System.DateTime.now' : unknown type (are you missing an assembly 
reference?)

It should probably say, "hey, you did not use the : to call a static 
method."

I think the Vulcan way is confusing especially if you are used to C# or 
VB.NET.

Let's take System.DateTime.DaysInMonth(2015, 2) in C# or VB.NET. 
DaysInMonth(int,int) is a method, yet in Vulcan, you also write 
System.DateTime.DaysInMonth(2015, 2). It is basically the same.
To return a string in C# you write System.DateTime.DaysInMonth(2015, 
2).ToString()
In Vulcan, you write: System.DateTime.DaysInMonth(2015, 2):ToString()

Talk about confusion!!

I think it is time to save Vulcan from VO semantics and do it the .NET way! 
Which is the standard way!

Jamal

"Robert van der Hulst"  wrote in message news:555F7706.9080906@heliks.nl...

No, definitely NOT a bug.

System.DateTime.Now is a static property of the DateTime structure. This
returns an Instance of the DateTime structure
ToShortTimeString() is a method of the DateTime structure.

Vulcan uses the ":" operator for method calls on instances, and the "."
for namespace delimiters and static method calls and static properties

So the correct Vulcan syntax is:

System.DateTime.Now:ToShortTimeString()
^                ^     ^
           a                 b     c

a = Namespace delimiter = Dot
b = Static Property access = Dot
c = Instance method call = Colon

The confusing thing is that C# and VB use Dots for all three, which is
why the following code could also be a call to the static method
ToShortTimeString() in the System.DateTime.Now class/structure


Robert

> Gary,
>
> It likes a bug in Vulcan.  ToShortTimeString()  is not recognized by the 
> vulcan intellisense parser and compiler.
>
> Jamal
>
> "Gary"  wrote in message 
> news:9d689b10-0ee8-4d5f-b28e-20192081c87d@googlegroups.com...
>
> Hi,
>
> I am trying to compile and run the following code:
>
>
> // CodeFile1.prg
> #using System
>
> FUNCTION Start() AS VOID
>
>   Console.WriteLine (System.DateTime.Now.ToShortTimeString() )
>   Console.ReadKey ()
>   RETURN
>
> The error I receive is:
>
> Error 1 'System.DateTime.Now' : unknown type (are you missing an assembly 
> reference?)
>
> This is driving me nuts.  Any suggestions?
>
> Thanks
> .
>


-- 
Robert van der Hulst
robert@heliks.nl 

[toc] | [prev] | [next] | [standalone]


#8133

FromRobert van der Hulst <robert@heliks.nl>
Date2015-05-23 14:58 +0200
Message-ID<5560796A.2000408@heliks.nl>
In reply to#8131
Jamal,

I don't think Vulcan is confusing at all.
This makes perfect sense to me:

System.DateTime.DaysInMonth(2015, 2):ToString()

The first part of the expression is:

System.DateTime.DaysInMonth(2015, 2)

This is the same in Vulcan as C# because DaysInMonth is a static method 
on the System.DateTime  structure ( like a function in the 
System.DateTime namespace). The return value of this method is a number.

The second part of the expression is

<number>:ToString()

ToString() is a method that you are calling on the numeric result of the 
DaysInMonth() function.

I personally think C# and VB are confusing, because they are using the 
dot operator for too many things.

And I do not think that Vulcan should be saved from VO semantics. The VO 
semantics in probably the only justification for existence of Vulcan. In 
many other aspects it is much better to use C# and/or VB.

Robert


>
> I thought I tried that with : operator. I tried again and it worked. 
> Anyway, the intellisense still does not work!
> What's worse is the Vulcan compiler confusing error message:
> 'System.DateTime.now' : unknown type (are you missing an assembly 
> reference?)
>
> It should probably say, "hey, you did not use the : to call a static 
> method."
>
> I think the Vulcan way is confusing especially if you are used to C# 
> or VB.NET.
>
> Let's take System.DateTime.DaysInMonth(2015, 2) in C# or VB.NET. 
> DaysInMonth(int,int) is a method, yet in Vulcan, you also write 
> System.DateTime.DaysInMonth(2015, 2). It is basically the same.
> To return a string in C# you write System.DateTime.DaysInMonth(2015, 
> 2).ToString()
> In Vulcan, you write: System.DateTime.DaysInMonth(2015, 2):ToString()
>
> Talk about confusion!!
>
> I think it is time to save Vulcan from VO semantics and do it the .NET 
> way! Which is the standard way!


-- 
Robert van der Hulst
robert@heliks.nl

[toc] | [prev] | [next] | [standalone]


#8140

FromGary <gkeefe109@gmail.com>
Date2015-05-29 08:30 -0700
Message-ID<7508411a-3cff-44a7-8f0c-2d629751b047@googlegroups.com>
In reply to#8130
Hi Robert.  

I am new to Vulcan and although I read the difference between ':' and '.' in Vulcan.Net AtWarpSpeed (left of the : is an object and the right is a method name) it obviously didn't sink in.  Makes complete sense now.

Thanks

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web