Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #8130
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post2.news.xs4all.nl!newszilla.xs4all.nl!not-for-mail |
|---|---|
| X-Spam-Checker-Version | SpamAssassin 3.2.3 (2007-08-08) on HADES |
| X-Spam-Level | |
| X-Spam-Status | No, score=-3.3 required=6.3 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham version=3.2.3 |
| Message-ID | <555F7706.9080906@heliks.nl> (permalink) |
| Date | Fri, 22 May 2015 20:35:50 +0200 |
| Newsgroups | comp.lang.clipper.visual-objects |
| From | Robert van der Hulst <robert@heliks.nl> |
| Reply-To | robert@heliks.nl |
| User-Agent | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
| MIME-Version | 1.0 |
| Subject | Re: Visual Studio Vulcan.Net Unknown Type |
| References | <9d689b10-0ee8-4d5f-b28e-20192081c87d@googlegroups.com> <mjnhuh$8p2$1@news.albasani.net> |
| In-Reply-To | <mjnhuh$8p2$1@news.albasani.net> |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Hops | 1 |
| Lines | 65 |
| NNTP-Posting-Host | 80.100.95.152 |
| X-Trace | 1432328824 dreader37.news.xs4all.nl 21257 80.100.95.152:52756 |
| Xref | csiph.com comp.lang.clipper.visual-objects:8130 |
Show key headers only | View raw
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
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
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
csiph-web