fbpx
Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC: System.Diagnostics.Debug.WriteLine(c)

System.Diagnostics.Debug.WriteLine(c) 2 years 6 months ago #680

  ArneOrtlinghaus's Avatar Topic Author ArneOrtlinghaus Offline Posts: 126
Hello,

I have the line
System.Diagnostics.Debug.WriteLine(c)
in my program together with
#using System.Diagnostics
This compiles under Vulcan.

I get the following error:
XS9002 Parser: unexpected input '.'
I tried substituing the '.' with ':' but I could not find a possibility to geth compiled this code.

Arne

Please Log in or Create an account to join the conversation.

System.Diagnostics.Debug.WriteLine(c) 2 years 6 months ago #682

  FFF's Avatar FFF Away Posts: 565
Strange, i get:
Compilation failed (1 error)
error XS0234: The type or namespace name 'Debug' does not exist in the namespace 'System.Diagnostics' (are you missing an assembly reference?)

Please Log in or Create an account to join the conversation.

System.Diagnostics.Debug.WriteLine(c) 2 years 6 months ago #683

  Otto's Avatar Otto Offline Posts: 141
Hi Arne,

I tried to reproduce your message, but I can't, sorry
Karl, you need a reference to System
#USING System.Diagnostics

BEGIN NAMESPACE XSharpClassLibrary1
	CLASS Class1
	CONSTRUCTOR()
		RETURN		
        METHOD MyMethod() AS VOID STRICT
           LOCAL c AS STRING
           c := "test"
           System.Diagnostics.Debug.WriteLine(c)
        RETURN
 	END CLASS
END NAMESPACE

Please Log in or Create an account to join the conversation.

System.Diagnostics.Debug.WriteLine(c) 2 years 6 months ago #685

  Frank Maraite's Avatar Frank Maraite Offline Posts: 172
Arne, Karl,

Vulcan includes System by default. X# does, as I know, include nothing in the reference list. I had to all those missing references in my old Vulcan code too.

Frank

Please Log in or Create an account to join the conversation.

System.Diagnostics.Debug.WriteLine(c) 2 years 6 months ago #686

  Chris's Avatar Chris Offline Posts: 1137
Hi Arne & guys,

This looks like a problem with a conjunction of the DEBUG symbol that is automatically defined when compiling in debug mode and the /vo8 compiler option which makes defines non case sensitive. I think we'll need to modify a bit the way the preprocessor works, will log a report about this. In the meantime, please add a @@ (which tells the preprocesor not to touch the word that follows) before Debug, as in:

System.Diagnostics.@@Debug.WriteLine(c)

or

@@Debug.WriteLine(c)

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

System.Diagnostics.Debug.WriteLine(c) 2 years 6 months ago #687

  ArneOrtlinghaus's Avatar Topic Author ArneOrtlinghaus Offline Posts: 126
Thanks,
this works.

Arne

Please Log in or Create an account to join the conversation.

System.Diagnostics.Debug.WriteLine(c) 2 years 6 months ago #689

  Frank Maraite's Avatar Frank Maraite Offline Posts: 172
Hey, that's why I like case sensivity.

Frank

Please Log in or Create an account to join the conversation.

System.Diagnostics.Debug.WriteLine(c) 2 years 6 months ago #691

  Chris's Avatar Chris Offline Posts: 1137
Hi Frank,

> Hey, that's why I like case sensivity.

In general I like it, too, but I hate it that you can define (in c# for example) identifiers with the same name, different case. It is so easy for example to define both a oXml and a oXML local in the same method and then accidentally use one instead of the other..

Chris
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

System.Diagnostics.Debug.WriteLine(c) 2 years 6 months ago #692

  Frank Maraite's Avatar Frank Maraite Offline Posts: 172
Chris,

just tested it. You're right, this is true for C#, but not for Vulcan. In Vulcan case sensivity was only applied to member and type names, not to LOCALs. What a mess.

But: your test's would fail for this case. And in small methods you should see it directly :-).

Frank

Please Log in or Create an account to join the conversation.

System.Diagnostics.Debug.WriteLine(c) 2 years 6 months ago #696

  robert's Avatar robert Offline Posts: 969
Arne,

This is fixed in the next build.

Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1