Home > Community > Forums > Custom IC SKILL > OcnPrint doesnt work inside CASE

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 OcnPrint doesnt work inside CASE 

Last post Tue, Mar 26 2013 8:53 AM by berndfi. 5 replies.
Started by RAO VINAY 26 Mar 2013 03:44 AM. Topic has 5 replies and 719 views
Page 1 of 1 (6 items)
Sort Posts:
  • Tue, Mar 26 2013 3:44 AM

    • RAO VINAY
    • Top 500 Contributor
    • Joined on Wed, Feb 22 2012
    • Posts 16
    • Points 275
    OcnPrint doesnt work inside CASE Reply
    Hello all,

    My script is as follows.

    for(j 2 4

    desVar( "nf" j )

    save( 'i "M0:id" )

    temp( 27 )

    run()

    selectResult( 'dc )

    plot(getData("M0:id") )

    case( j

    ("2" ocnPrint(?output "/home/vinay_rao/create/moschar_file/nmosw/nmosw1.dat" ?numberNotation 'scientific getData("M0:id")))

    ("3" ocnPrint(?output "/home/vinay_rao/create/moschar_file/nmosw/nmosw2.dat" ?numberNotation 'scientific getData("M0:id")))

    ("4" ocnPrint(?output "/home/vinay_rao/create/moschar_file/nmosw/nmosw3.dat" ?numberNotation 'scientific getData("M0:id")))

    ) )

    I have used CASE inside FOR statement. CASE contains ocnPrint but it's not generating any .dat files and also I found no errors/warnings. If I am using ocnPrint outside CASE then it is generating but not inside of it. Why this script failed to generate .dat under CASE? I am using IC614.


    Regards,

    Vinay Rao.
    • Post Points: 20
  • Tue, Mar 26 2013 4:33 AM

    • berndfi
    • Top 100 Contributor
    • Joined on Tue, Sep 11 2012
    • Neubiberg, Bavaria
    • Posts 64
    • Points 1,195
    Re: OcnPrint doesnt work inside CASE Reply

    Of which datatype is the variable j?

    • Post Points: 20
  • Tue, Mar 26 2013 5:19 AM

    • RAO VINAY
    • Top 500 Contributor
    • Joined on Wed, Feb 22 2012
    • Posts 16
    • Points 275
    Re: OcnPrint doesnt work inside CASE Reply

     Thanks for your reply Berndfi. I didn't define any datatype explicitly for "j " as I thought it takes automatically j a integer. Whether I need to define j as "int"explicitly? If so then can you give me the syntax for it?

    • Post Points: 20
  • Tue, Mar 26 2013 6:05 AM

    Re: OcnPrint doesnt work inside CASE Reply

    Your for loop assigns integers to j, but your case is checking for j as string values (they are in quotation marks), so none of the branches of the case match...

    Your case should be:

    case(j
      (1 ...)
      (2 ...)
    )

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Mar 26 2013 6:17 AM

    • RAO VINAY
    • Top 500 Contributor
    • Joined on Wed, Feb 22 2012
    • Posts 16
    • Points 275
    Re: OcnPrint doesnt work inside CASE Reply

     Now it works Andrew. You are right that it was taking it as a string. Thanks a lot. 

    • Post Points: 20
  • Tue, Mar 26 2013 8:53 AM

    • berndfi
    • Top 100 Contributor
    • Joined on Tue, Sep 11 2012
    • Neubiberg, Bavaria
    • Posts 64
    • Points 1,195
    Re: OcnPrint doesnt work inside CASE Reply

     I thought my question points out the error, but seemed not to be the case.
    Even if you do not have to declare datatypes explicitly in SKILL doesn’t mean that they don’t exist.

    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by RAO VINAY at 26 Mar 2013 03:44 AM. Topic has 5 replies.