SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7

Thread: @ operator

  1. #1
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    @ operator

    When I tried to call
    Function BrowserPage.HtmlTextField("Maximum Good Exit Code:[1]").GetText()

    using the @ operator it tells me this function is not defined.

    Anyone know why?

    Is there a restriction???

    I had it like @("BrowserPage.HtmlTextFile(""{info}""}.{function} )")()
    and funtion = GetText()

    ------------------

  2. #2
    Member
    Join Date
    Nov 2000
    Location
    Shelton, CT, USA
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: @ operator

    The correct syntax would be:

    Using variables like it looks like you would like to do:


    To pass aguements into the function:
    ------------------


    [This message has been edited by mvpl (edited 04-25-2001).]

  3. #3
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: @ operator

    Why is it not possible to take the whole string :

    BrowserPage.HtmlTextFile(info).GetText()

    as the @'s argument?? Also is it possible to pass in multiple argument(even thought it seems cumbersome). Ex: @("Max")(1,2)

    ------------------

  4. #4
    Member
    Join Date
    Nov 2000
    Location
    Shelton, CT, USA
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: @ operator

    Simply put, it the incorrect syntax. You're mixing variables with functions. You use arguements the same way you would normally.

    You can mix the @ with variables and functions with the correct syntax. I use this method all of the time with RECORDS

    Hope this helps.
    -Michael

    ------------------

  5. #5
    Member
    Join Date
    Jan 2001
    Location
    Westborough, mA, USa
    Posts
    91
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: @ operator

    If you want to pass the whole thing you should declare it as a window but still you wouldn't be able to call the function.

    For Ex:

    Window w = BrowserPage.HtmlTextField("Maximum Good Exit Code:[1]").

    You can use as w.GetText()

    Hope this helps

    ------------------

  6. #6
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: @ operator

    The purpose of @ is to be able to call a function from a variable. In another word trying to simulate pointer to function.

    I thought @ takes a string and run it.

    Another poorly documentated area from Silk.

    ------------------

  7. #7
    Member
    Join Date
    Nov 2000
    Location
    Shelton, CT, USA
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: @ operator

    The @ operator allows you to reference a variable OR a function. Two distinct and separate things. The way I understand it, yes it mimics a pointer to a variable OR a function. The way to differentiate the two is to reference a function you need the () at the end. To reference a variable you don't.

    Hope I'm not confusing you even more... Take the time to play around with this. You can do some pretty cool with the @ operator.


    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:24 AM.

Copyright BetaSoft Inc.