SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ListPrint method won\'t accept multiple parameters.

    I've written a ListPrint method that I use to optionaly print results to a plain text file and/or HTML file.

    I'm passing ListPrint a List of String and it works just fine. However, I need to be able to pass it an integer as a second, optional parameter.

    So my funcion looks like this

    _ListPrint(List of String lsList, Integer iPrintDepth optional)

    If I pass two parameters, say _ListPrint(lsInput, iValue), I get an error message that I am passing too many params to it. Is there a problem in Silk 5.0.3.2 with passing multiple params when one of them is a List of String?

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

  2. #2
    Member
    Join Date
    Oct 2000
    Location
    Bothell, WA, USA
    Posts
    54
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ListPrint method won\'t accept multiple parameters.

    I'm not sure if I am missing something here, but the ListPrint function will only accept a single argument of type LIST. I created the following testcase and function that works fine. Would this sort of thing work for you?

    [-] MyListPrint (LIST OF STRING lsInput, INTEGER iValue optional)
    ....[-] if iValue != NULL
    ........[ ] Print ("I don't know what it's for, but here's {Str (iValue)}")
    ........[ ] Print ()
    ....[ ] ListPrint (lsInput)
    [ ]
    [-] testcase Test_MyListPrint () appstate none
    ....[-] LIST OF STRING lsOutput = <text>
    ........[ ] do
    ........[ ] re
    ........[ ] mi
    ........[ ] fa
    ........[ ] so
    ....[ ] INTEGER iNumber = 100
    ....[ ]
    ....[ ] MyListPrint (lsOutput, iNumber)
    [ ]

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


    [This message has been edited by dano (edited 02-12-2002).]

    [This message has been edited by dano (edited 02-12-2002).]

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ListPrint method won\'t accept multiple parameters.

    Thanks dano.

    I banged on this a little from home last night and figured out my problem. I was calling my _ListPrint function from within a custom winclass and I did not add the second parameter to that. So, of course, Silk yelled at me.

    In answer to your other question, I've overridden all the output functions of Silk so I have a _Print() _Print2() _Print3() _LogError() etc. This allows me to do some different things with the output. To accomplish _ListPrint() I'm reading the list in and walking it line by line and spiting each line out to the _Print() function with the added formatting I want.

    Thanks for your feedback.



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

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:16 AM.

Copyright BetaSoft Inc.