Welcome, Guest
Username: Password: Remember me
This public forum is meant for questions and discussions about Visual FoxPro
  • Page:
  • 1

TOPIC:

XSharp Cahors 2.13. Broke my Code 11 Oct 2022 10:40 #24129

  • Florentin Lüdeking
  • Florentin Lüdeking's Avatar
  • Topic Author


  • Posts: 11
  • Hey everyone, i really need some help with this!
    Before i updated to XSharp Cahors 2.13. this Code worked :

    PRIVATE gcTextfeldvalue AS STRING
    gcTextfeldvalue = "Hier könnte Ihre Werbung stehen"

    Now i Get this Error: XS9002 Parser: unexpected input 'PRIVATE'

    Can someone please help me with this i have no clue whats going on :(

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

    XSharp Cahors 2.13. Broke my Code 11 Oct 2022 11:35 #24130

    • robert
    • robert's Avatar


  • Posts: 3269
  • Florentin,
    Can you show a bit more context ?
    I think the parser gets confused and thinks that the PRIVATE gcTextfeldvalue is a field in the class.

    Robert
    XSharp Development Team
    The Netherlands

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

    XSharp Cahors 2.13. Broke my Code 11 Oct 2022 11:44 #24131

    • Florentin Lüdeking
    • Florentin Lüdeking's Avatar
    • Topic Author


  • Posts: 11
  • That is the whole File (Without Usings for less clutter)
    It worked exactly like this before i updated it.
    BEGIN NAMESPACE Import                    
    
    FUNCTION Start() AS VOID
    
    Application.EnableVisualStyles()
    Application.SetCompatibleTextRenderingDefault( FALSE )
    
    PRIVATE gcTextfeldvalue AS STRING
    gcTextfeldvalue = "Hier könnte Ihre Werbung stehen"
    PRIVATE cZwFormAufruf AS STRING
    cZwFormAufruf = "konvert_basis1"
    
    _CallClipFunc(cZwFormAufruf)
    
    
    
    
        RETURN
    	
    END NAMESPACE

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

    XSharp Cahors 2.13. Broke my Code 11 Oct 2022 13:25 #24132

    • ic2
    • ic2's Avatar


  • Posts: 1573
  • Hello Florentin,

    I'd say that you define PRIVATE in a class.

    In a function like you write PRIVATE gcTextfeldvalue As String fails. LOCAL gcTextfeldvalue As String works.

    Dick

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

    XSharp Cahors 2.13. Broke my Code 11 Oct 2022 13:41 #24133

    • Florentin Lüdeking
    • Florentin Lüdeking's Avatar
    • Topic Author


  • Posts: 11
  • No i dont define PRIVATE anywhere.

    There are no occurences other than
    PRIVATE variable AS INT
    PRIVATE METHOD method AS VOID

    I dont use it in any other context and like i said, it worked before i updated it.

    Florentin

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

    XSharp Cahors 2.13. Broke my Code 11 Oct 2022 13:45 #24134

    • robert
    • robert's Avatar


  • Posts: 3269
  • Florentin,

    Are you sure that your application is using the FoxPro dialect and the the option to "Enable Memvar Support" on the Language Tab of the project properties is selected?
    We changed some rules in 2.13 parser, because sometimes the compiler was confusing PRIVATE memory variables with PRIVATE fields inside a class.
    However in your example code there is no class, so no confusion.
    The change that we made is this:
    PRIVATE <var> AS <type>
    is now only supported in the FoxPro dialect and when the "Enable Memvar Support" option is enabled
    the other dialects only support
    PRIVATE <var>
    but also only when the "Enable Memvar Support" option is enabled.

    Even though in the FoxPro dialect you are allowed to add AS <type>, you must know that Private variables are never typed, but they are always of type USUAL.
    The "AS <type>" clause is recognized by the parser but will produce a warning:
    XS9230: The 'AS STRING' clause is not supported and ignored.

    Robert
    XSharp Development Team
    The Netherlands

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

    XSharp Cahors 2.13. Broke my Code 11 Oct 2022 13:47 #24135

    • Florentin Lüdeking
    • Florentin Lüdeking's Avatar
    • Topic Author


  • Posts: 11
  • That worked!

    Thank you very much Robert :)

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

    • Page:
    • 1