Logical Comparisons Of Wrappers

Ok super easy question...so easy that it's not documented anywhere that I have searched so far...
Is it proper to compare wrappers with logical operators (i.e. ==, !=)?
Technically a wrapper is an object, so therefore the == operator would compare the memory address of the two objects to give you a boolean expression result. Meaning, this result is probably not the 'logically equivalent' result you were looking for. However, is it proper to compare a wrapper to a literal using these operators? For example...
Integer i = new Integer(7);
if (i == 7) {}or...
if (i != 7) {}Is the wrapper implicitly cast? I have heard of something called autoboxing which says this might be the case, where the conversion from wrapper to primitive and vice versa is automated. Or, do I need to explicitly grab the int value from the wrapper for the comparison as such...
if (i.intValue() == 7)or...
if (i.intValue != 7)I have seen code in both forms in working applications. So which is correct, or more correct as the case may be? Is this something that is version specific? One question turned into many, sorry about that, but thanx for your responses. :D
~ Jester's Chef

If you are using Java5.0 then you can use "if (i == 7)" because the compiler will handle getting the int vaule from i. (ie autoboxing)
If you are using a version before Java5.0 you have to retrieve the int value from the Integer object and then do the comparison like "if (i.intValue() == 7)"
So the answer depends on which version of Java you are using.

Similar Messages

  • Urgent : Help required for logical comparison of two 2GB files.

    Large files need to be compared depending on Business logic. No byte to byte comparison to be done. It would require reference of data written at the start of the file at some other later part of the file too while comparing two files. File needs to be stored in memory while comparison is done. Kindly suggest some way out which would give best performance. Memory limitations are 256 MB RAM.

    File needs to be stored in memory while comparison is done.
    Memory limitations are 256 MB RAM.You have 4 GB of data. You have 256 MB of RAM to put it in. Obviously one of those two assumptions has to be changed. By the way, what is the XML connection for this question?

  • How to perform logical comparison using struts

    Hi all, I know this is probably not the best forum for a question regarding struts, but am sure most developers here are familiar with it.
    how do you implement this using struts logic present or logic no present tags ?
    if ((a != null ) && (b != null))
         // perform operation
    else
         // perform altername operation
    I am familiar with the stuts logic tags but not sure about the nesting levels to perform this type of operation.
    Cheers

    <logic:present name="XXXXForm" property="a">
         <logic:present name="XXXXForm" property="b">
              // perform operation
         </logic:present>
    </logic:present>
    <logic:notPresent name="XXXXForm" property="a">
         <logic:notPresent name="XXXXForm" property="b">
              // perform altername operation
         </logic:notPresent>
    </logic:notPresent>
    /code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Logical Comparisons Using Numerical Values

    Hello:
    I am trying to create an if statement that tests when two variables equal zero. My problem is that I'm trying to use a logical & both variables are numeric, not boolean. Is there another way to do this? My code is below:
    if (released.getX() = 0) & (released.getY() = 0)
    Thanks!

    More precicely with && if the first expression is not true then the second expresion is not evaluated, however if the first expresion is true then the second part must be evaluated to determine if it is true too. Therefore if you have two conditions to check for and you expect one to be false more often then not, then by placing it first in the expresion it could help to reduce overall execution time.
    Secondly you may not always want to use &&. For instance if the expresions on each side of the & invoke a method that does some work before returning a true or false and your code relys on the added work that the function(s) perform then using the && could result in unexpected results.

  • GarageBand - Logic Comparison Tomorrow in Seattle

    We're going to be holding a free seminar comparing GarageBand to Logic tomorrow night (6:30pm) at the dBug Resource Center in Seattle, WA. All are welcome, so if you're in the Seattle area, drop in and join us! The dBug.org web site has more info.

    Hello,
    One thing that is helping me find my way through is:
    http://www.macprovideo.com/
    You can set up an account and download the first 2 sections of Logic 101 for free. I found it to be very helpful, so I downloaded the entire course a week later. I still read through the manual as much as possible but the videos seem to work better for me.
    -deltonfoster
    PowerBook G4 15" 1.67 1.5 GB Ram   Mac OS X (10.4.8)   PreSonus FirePod, iControl, Maxtor 200GB-HD, Logic Express-7

  • Logical Functions In Forms?

    We have a basic Excel form that we are converting to PDF since our users don't have Excel on their PCs. Anyway, it is a very simple form where the user enters data into three fields and then two calculations are automatically performed using Divsion. But when we put it into PDF, it keeps telling us one of the calculated fields is in the wrong format when one of the entry fields is empty. The calculated fields are set as Percentage. This is the formula in Excel? Can we transcribe it over to PDF? =IF(R)=0,0,(W/R)
    Or is there a better way to have it ignore empty fields?
    Thank you

    Yes you can test for a logical true or logical false value and control the execution of the code. It is even possible to set an object's property that has a true of false value with the result of a logical comparison. This can be done with a document level function for the division that can be used within the entire form and custom JavaScript calculation for a field.
    // document level function for use in entire form
    function Divide(nDividend, nDivisor) {
    // divide nDividend by nDivisor and return result
    return nDivisor == 0? 0 : nDividend / nDivisor;
    } // end Divide function
    // end of document level function
    // custom calculation script for a field
    // values to process
    var W = this.getField("W").value;
    var R = this.getField("R").value;
    // perform division
    event.value = Divide(W, R);
    // end of custom calculation script

  • How to use logical operator

    Hi ,
    I hava a problem while using logical operators.
    I wrote a procedure to compare two strings.please check the following.
    CREATE OR REPLACE PROCEDURE comp_str(sour_str IN varchar2,targ_str IN varchar2) AS
    leng_sour_str number:=NVL(length(sour_str),0);
    leng_targ_str number:=NVL(length(targ_str),0);
    leng_str number:=NULL;
    BEGIN
    IF sour_str IS NULL THEN
    dbms_output.put_line(leng_targ_str);
    elsif targ_str IS NULL THEN
         dbms_output.put_line(leng_sour_str);
    ELSE
         select utl_match.edit_distance(leng_sour_str,leng_targ_str) into leng_str from dual;
    END IF;
    dbms_output.put_line(leng_str);
    IF (leng_str > 0) OR (leng_sour_str > 0) OR (leng_targ_str > 0) THEN
    dbms_output.put_line('Strings are not same');
    ELSE
    dbms_output.put_line('Strings are same');
    END IF;     
    END comp_str;
    IF (leng_str > 0) OR (leng_sour_str > 0) OR (leng_targ_str > 0) statement is not verifying the conditions properly.
    Please suggest me that how to write multiple conditions with OR Operator or any alternative.
    thanks in advance.

    They are working exactly as you expect it. The problem in your code is probably the "utl_match.edit_distance"-procedure. Do you know the outcome of this procedure?
    Why don't you try something like
    declare
      l_string1   varchar2(255) := 'String1';
      l_string2   varchar2(255) := 'String 2';
    begin
      if length(l_string1) > length(l_string2) then
        dbms_output.put_line('String 1 is longer than String 2');
      else
        dbms_output.put_line('String 1 is shorter than String 2');
      end if;
    end;This way, you can change one string or the other and see, how it works. With utl_match.edit_distance you need to know what exactly they are computing to see what the logical comparison is doing.

  • XPath in BPM switch

    Hi,
    I'm trying to use a switch in an integration process that relies on XPath for the switching logic and I am having some difficulties getting it to work.
    I've tested the following and it is a valid XPath statement, but does not seem to work as I would expect in XI
    /p1:BAPI_EQUI_GETDETAIL.Response/DATA_GENERAL_EXP[number(translate(READ_CRDAT, "-", ""))>=20010101]
    This should return a node and if the string in READ_CRDAT is greater than 2001-01-01 and thus satisfy the EX condition. However, all of the records are rejected even though there are number of test cases that should pass.
    What type should I specify in the expression editor for the XPath? Can you use the number() and translate() functions in XI? Is there a length limit to XPath expressions? Are there other known issues that prevent this kind of logical comparison?
    TIA for your help.
    Rob

    Hey,
    In the source structure is the the string of the format 2001-01-01 ? Then probably you can use this deine a constant of type string and the value 2001-01-01.
    Then for the xpath expression
    /p1:BAPI_EQUI_GETDETAIL.Response/DATA_GENERAL_EXP[number(translate(READ_CRDAT, "-", ""))>=constant]
    or you can try this one for the existing condition.
    /p1:BAPI_EQUI_GETDETAIL.Response/DATA_GENERAL_EXP[number(translate(READ_CRDAT, "-", ""))>=2001-01-01]
    Give it a shot.
    Cheers
    <b>*RAJ*
    *REWARD POINTS IF FOUND USEFULL*</b>
    XPath in BPM switch
    Posted: Jul 18, 2007 4:54 AM 
    Hi,
    I'm trying to use a switch in an integration process that relies on XPath for the switching logic and I am having some difficulties getting it to work.
    I've tested the following and it is a valid XPath statement, but does not seem to work as I would expect in XI
    /p1:BAPI_EQUI_GETDETAIL.Response/DATA_GENERAL_EXP[number(translate(READ_CRDAT, "-", ""))>=20010101]

  • Where Not

    These both not returning same number, am i missing anything, I would like change the first query to write in other format, because i have lot of and conditions like this. I have given only one as example.
    -- Original query ; working
    SELECT COUNT(*) FROM P
    INNER JOIN R WITH ( NOLOCK )
    ON R.Id = P.Id
    where P.Pk NOT IN (
    SELECT p.Pk
    WHERE R.Name = 'S'
    AND p.Type = 'O' )
    and R.Date = '7/16/2014'
    -- Test query ; not returning same rows as above
    SELECT COUNT(*) FROM P
    INNER JOIN R WITH ( NOLOCK ) ON R.Id = P.Id
    where NOT (R.Name = 'S' AND p.Type = 'O')
    and R.Date = '7/16/2014'

    Those two statements will not return the same result if either R.Name or P.Type is NULL and R.Date = '7/16/2014'
    To see why that is true, consider the case where R.Name is NULL and P.Type = 'O'.
    The first query's inner select is Select p.Pk WHERE R.Name = 'S' AND p.Type = 'O'.  That will return zero rows because R.Name is NULL.  So the NOT IN will be TRUE and since the R.Date condition is TRUE so the entire where is true and that row is
    counted.
    In the second case, you check if R.Name = 'S'.  Since R.Name is NULL, the result of that logical comparison is UNKNOWN (that is, neither true nor false).  You then AND that with p.Type = 'O' which is TRUE.  So you get UNKNOWN AND TRUE - the
    result of that is UNKNOWN.  You then do a NOT of that UNKNOWN values which is still UNKNOWN.  You then and that with R.Date = '7/16/2014', so the final result of your where condition is UNKNOWN.  So this row is not counted.
    So the first and second queries can return different results.
    I gather from your question that you want a query using the form of the second query that will return the same result as the first query.  To do that you have to handle the NULL's.  One way would be to do
    SELECT COUNT(*) FROM P
    INNER JOIN R ON R.Id = P.Id
    where Not (IsNull(R.Name, 'S') <> 'S' And IsNull(p.Type, 'O') <> 'O')
    and R.Date = '7/16/2014'
    Tom

  • Sd cycle

    Please send me the flow of SD cycle in ABAP and linking between SD transparent tables.

    hi...
    Application Development Process
    In this section, we will:
    <u><b>Planning Phase</b></u>
    Some of the most important artifacts in the planning phase are as follows:
    SyncBOs required in the application are identified and verified that they can be mapped to the business objects in a backend system as well as they are sufficient to realize the client-side requirements
    Client GUI design and navigation model are determined and agreed by the stakeholders
    Use cases covered in each iterative cycle in the implementation phase are determined
    One of the key decisions in the planning phase is to identify the business objects in the backend system and to decide how they are represented in the client application. Since one of the core functions of an Smart Sync application is that the business objects updated on a client device is successfully uploaded to a backend system and vice versa, it is very important to identify which business object in a backend system can be used and to identify the dependencies of the business objects on other objects. The identification of the business objects is typically followed by the identification of existing BAPIs. Then, it is necessary to identify the header and item structures of each object.
    On the client side, the same business object identification process is required based on the requirements. It is especially important to identify whether the downsized or merged version of the business objects in a backend system can be used.
    In most cases, BAPI wrappers are responsible for absorbing the differences between the client-side business objects and those in a backend system. However, if they are greatly different, it should be carefully investigated whether BAPI wrappers can really absorb the differences.
    Since the GUI requirements of client applications can differ greatly from an application to another depending on the target application users, it is advisable to conduct a preliminary usability test with potential users of the application and to agree on the GUI design and navigation model used in the application as early as possible.
    Finally, before moving on to the first development cycle, it is worth planning which use cases will be covered in each development cycle (For more information, refer to Iterative / Use Case Driven Development).
    <u><b>Implementation Phase</b></u>
    In each development cycle in the implementation phase, the client- and server-side components can be developed in parallel. However, it is important to be aware of the following dependencies:
    To finalize the SyncBO access logic in the client application, the definition of SyncBOs needs to be completed, and the changes in SyncBO definition can affect the client SyncBO access logic
    When SyncBOs are defined and BAPI wrappers are implemented, sample data from a backend system can be used for client application standalone testing; before that, test data must be created within the test code of the client application
    For efficient parallel development, therefore, it is important to plan the activities accordingly taking these dependencies into account.
    <u><b>  Test / Deployment Phase</b></u>
    At the end of each development cycle, it is important to conduct the integration/synchronization test, which should include the following:
    Synchronization performance benchmark with various data volume
    Performance benchmark of the client application on a target client device
    Application deployment test
    Performing the integration/synchronization test at the end of each development cycle is beneficial because it makes it possible to identify issues and risks that should be addressed in the next development cycle.
    After the completion of all the development cycles and testing, SyncBOs and BAPI wrappers are moved to the production system and an installation package of the client application is put in a Mobile Infrastructure server for automatic deployment to client devices.
    Iterative / Use Case Driven Development
    It is rarely the case that the first plan remains unchanged throughout the entire development cycle, no matter how thoroughly the planning is conducted. Thus, as widely recommended in modern software development process, the iterative and incremental development is one of the key factors also for a successful Smart Sync application development. For an effective iteration, the following can be applied:
    Cover only a couple of high-level use cases in each development cycle starting with the least dependent ones
    <b>Example</b>
    Suppose that it is identified that “customer” business object is not dependent on other main business objects although it uses “country” and “region” business objects. Suppose also that “sales order” business object refers to “customer” business object.
    Then, the first cycle might cover only “customer” business object and related ones such as “region” and “country” objects, and not “sales order” business object. Furthermore, the first cycle might just concentrate on the display of customer list and detail use cases, and the creation of a customer use case might be covered in a later cycle.
    Plan each development cycle to be completed in a relatively short time period, for example, in less than or equal to 3-4 weeks
    Conduct integration/synchronization test at the end of each development cycle
    Refine the schedule and the design based on the issues and risks identified in the previous cycle as well as the changes in the requirements (change management)
    The benefits of such an iterative approach is as follows:
    Makes it possible to identify and tackle issues/risks earlier in the development life cycle such as architecture risks and performance bottlenecks
    Reduces the integration risks at the very end of the implementation phase
    Allows continuous quality improvements and facilitates identification of reusable components
    Makes it easy to keep track of the progress and to adjust the schedule
    Makes it possible to demonstrate the application from an earlier phase of the application development, which makes it easy to get feedbacks from the stakeholders and incorporate them in the application
    Allows the participation of technical writers and testers earlier in the implementation phase
    Allows application developers to gain skills/knowledge required in various aspects of the development relatively quickly
    Allows the process improvements over the iterative cycles
    Server-side Application Development Process
    The keys of the server-side development are as follows:
    BAPI wrappers (function modules) implemented in the target backend system
    SyncBOs defined in Smart Synchronization, which includes the generation of the runtime components
    The table below describes the skills/knowledge and tasks required:
    Target System
    Skill / Knowledge Task
    Web AS 6.20 Smart Sync SyncBO builder Defining SyncBOs (parameter settings) 
    Backend SAP system  Backend application knowledge (inc. BAPIs available), ABAP  BAPI wrapper (ABAP function module) development 
    In the planning phase, it is important to identify the business scenario and the business objects required, which is followed by the identification of appropriate BAPIs available in the target backend system. It is important to agree on how the identified business objects are represented in the client application. If the business objects used in a backend system are very different from ones in client devices, BAPI wrappers may need to absorb the differences. This can be done also on the client-side application; however, it is often the case that it is less effective to do that.
    In the implementation phase, ABAP programming is required for each BAPI wrapper, and SyncBOs need to be defined using the SyncBO Builder. The SyncBO Builder will generate the runtime component (synchronizer) for each SyncBO. Then, using the SyncBO Builder, it is also necessary to generate the so-called meta-data XML, which is referenced by a client application that accesses the SyncBOs defined.
    Often, it is a useful approach to define a SyncBO as soon as possible when BAPI wrapper interfaces are defined and activated for the SyncBO but before implementing the logic in BAPI wrappers. This makes it possible to generate a meta-data XML, which is often referenced during developing SyncBO access logic of a client application.
    In the testing phase, the synchronization test needs to be performed. Finally, in the deployment phase, the BAPI wrappers and SyncBOs are transported to the target production systems.
    The diagram below describes the simplified process of the server-side application development and where the details are covered in this cookbook:
    For details of BAPI wrapper development, refer to BAPI Wrapper Development.
    For details of defining SyncBO, refer to Defining Synchronization Business Object (SyncBO).
    Client-side Application Development Process
    The key deliverable of the client-side application development is a compiled JSP/AWT application in an archive file such as a .war/.jar file.
    The skills/knowledge required for the client application development are JSP/AWT application development skills as well as the business requirements of the client application.
    The client-side application development is not different from a normal JSP/AWT application development. One of the differences is, however, that the data access is performed using Smart Sync APIs.
    Some of the important considerations in the client application development are as follows:
    Apply Model-View-Controller design pattern, which is a popular approach of a JSP/AWT application, if the application is reasonably complex
    In most cases, Smart Sync APIs should be called only within BO classes in the Model layer for reusability such as replacing the View layer with another.
    Always keep in mind that PDAs are different from PCs, even if the software technology looks the same as the technology of PCs
    Pay attention particularly to memory consumption and performance, and conduct the performance test on a target client device from an early phase of the development
    Decide the GUI design and flows of the application as early as possible
    Plan development activities taking the availability of meta-data XML, which defines the client view of the SyncBOs, into account
    Develop a build script so that the standalone and integration tests are conducted frequently .
    or u can visit the link
    https://www.sdn.sap.com/irj/go/km/docs/library/mobile/mobile%20infrastructure/mobile%20development%20kit%202.5/content/appdev/smartsync/app_dev_process.html
    <b>plz reward pts if helpful.</b>
    regards
    vijay

  • Regular expression to compare numbers

    I have a method
    compare(Object value, String searchTxt);
    The value can either be a Number, Date, String.
    The searchTxt can have values to compare Strings, Dates, Numbers. It also can have logical comparison operators like =, !=, >, <, >=, <= eg.
    compare(numValue, "> 1000 <= 2000)
    compare(dateValue, "> 2006/12/12 <= 2007/01/25)
    compare(stringValue, "> abc <= xyz )
    Can I have some regular expression to control this comparision and make my life little easier. Because spliting the string and checking for all possible options can be a tedious job.
    Peace n Regards

    No. The searchTxt can have values like
    "> 1000 <= 2000"
    "> 2006/12/12 <= 2007/01/25"
    "> abc <= xyz"
    But I can check for the instanceof for the "value" and know that the searchTxt contains logical opearators plus (only Number or only Date or only String).
    The real requirement is to comare the "value" according to the search string.
    Say for eg:
    if the method compare is invoked as compare(200, ">=100<500") it should return true
    if the method compare is invoked as compare("xyz", ">=abc<xxx") it should return false
    and so on...

  • Workflow time limit.

    Hello, I`m new in workflow and I want to know if exists risks if I want to make an workflow that can exists between one month to one year.
    In my workflow are between 3 to 6 validators and some item task can wait for an date time that can be over two month before goes to the next step.
    My situation for workflow instance in the same time are:
         - 300 workflow instance  that can execute in  two week.
         - 0  tot 200 workflow instance that can execute between one month to one year.
    Are problems that can apear?
        - like time out( exist a limit for an wait task item)
        - what happend if some workflow are in progress and I put a new version of workflow.(existing instance continue with old version or with new version?)
        - what other problem can apper?      
    In this situation can you sugest some trick and tips.
    thanks a lot

    Hi Teodor,
    I guess this is not for regular creation/update rather something like risk data review of Vendors or compliance related data maintenance.
    Please find my comments below your queries -
    In my workflow are between 3 to 6 validators and some item task can wait for an date time that can be over two month before goes to the next step.
    This is possible and viable.
    My situation for workflow instance in the same time are:
         - 300 workflow instance  that can execute in  two week.
         - 0  tot 200 workflow instance that can execute between one month to one year.
    Here in WF which can execute within 2 weeks you should define a different process so as to differentiate b/w the faster and slower WFs.This would help in easier tracking and better maintenance.
    Are problems that can apear?
        - like time out( exist a limit for an wait task item)
    As mentioned above this can be handled better if you have different strand of WF for faster process and different for slower process.This would help in maintenance and easier tracking of jobs.
        - what happend if some workflow are in progress and I put a new version of workflow.(existing instance continue with old version or with new version?)
    If there is a change in meta data the job can go in error.To mitigate this the WF should be made as modular as possible.e.g. use of lookup values for bifurcation or logical comparison rather than field values,restricting data model changes,less field dependent and more data dependent WF.
    Modular WF also ensures that if a WF goes in error the data loss is minimised by reverting to last Approved step.
        - what other problem can apper?     
    Error is jobs.
    Jobs getting stuck.
    Technical error in WF and complex troubleshooting.
    Change in user leading to delegation of task.
    Data loss etc.
    Thanks,
    Ravi

  • I need help with event structure. I am trying to feed the index of the array, the index can vary from 0 to 7. Based on the logic ouput of a comparison, the index buffer should increment ?

    I need help with event structure.
    I am trying to feed the index of the array, the index number can vary from 0 to 7.
    Based on the logic ouput of a comparison, the index buffer should increment
    or decrement every time the output of comparsion changes(event change). I guess I need to use event structure?
    (My event code doesn't execute when there is an  event at its input /comparator changes its boolean state.
    Anyone coded on similar lines? Any ideas appreciated.
    Thanks in advance!

    You don't need an Event Structure, a simple State Machine would be more appropriate.
    There are many examples of State Machines within this forum.
    RayR

  • Incorrect logical expression: Comparison / SELECT-OPTION can only be follow

    Hi,
    I'm new to ABAP, please help me with the below code. When i check the code i get the message "E:Incorrect logical expression: Comparison / SELECT-OPTION can only be followed by "AND", "OR" or ")".
    data: pphd(7) type p decimals 2,
              ppha(7) type p decimals 2,
              abs_pphd(7) type p decimals 2.
        if pphd >= 0.
          if pphd < 1.
            ppha = 0.
          elseif 1 <= pphd <= 4.
            ppha = '0.16'.
          elseif 4.01 <= pphd <= 8.
            ppha = '0.32'.
          elseif 8.01 <= pphd <= 12.
            ppha = '0.50'.
          elseif 12.01 <= pphd <= 16.
            ppha = '0.66'.
          elseif 16.01 <= pphd <= 20.
            ppha = '0.83'.
          elseif 20.01 <= pphd <= 24.
            ppha = '1.00'.
          elseif 24.01 <= pphd <= 28.
            ppha = '1.16'.
          elseif 28.01 <= pphd <= 32.
            ppha = '1.32'.
          elseif pphd >= 32.
            ppha = '1.50'.
          endif.
        else.
          abs_pphd = abs( pphd ).
          if abs_pphd < 1.
            abs_ppha = 0.
          elseif 1 <= abs_pphd <= 4.
            ppha = '-0.16'.
          elseif 4.01 <= abs_pphd <= 8.
            ppha = '-0.32'.
          elseif 8.01 <= abs_pphd <= 12.
            ppha = '-0.50'.
          elseif 12.01 <= abs_pphd <= 16.
            ppha = '-0.66'.
          elseif 16.01 <= abs_pphd <= 20.
            ppha = '-0.83'.
          elseif 20.01 <= abs_pphd <= 24.
            ppha = '-1.00'.
          elseif 24.01 <= abs_pphd <= 28.
            ppha = '-1.16'.
          elseif 28.01 <= abs_pphd <= 32.
            ppha = '-1.32'.
          elseif abs_pphd >= 32.
            ppha = '-1.50'.
          endif.
        endif.
    Thanks,
    AM

    Hi Raj,
    Thanks a lot for the reply. i modified the code as you suggested but i get the error "E:Incorrect logical expression: Only "... BETWEEN  AND ..." is expected."  Below is the modified code.
    data: pphd(7) type p decimals 2,
          ppha(7) type p decimals 2,
          abs_pphd(7) type p decimals 2.
    if pphd >= 0.
      if pphd < 1.
        ppha = 0.
      elseif pphd between 1 and 4.
      ppha = '0.16'.
      elseif pphd between 4.01 and 8.
        ppha = '0.32'.
      elseif pphd between 8.01 and 12.
        ppha = '0.50'.
      elseif pphd between 12.01 and 16.
        ppha = '0.66'.
      elseif pphd between 16.01 and 20.
        ppha = '0.83'.
      elseif pphd between 20.01 and 24.
        ppha = '1.00'.
      elseif pphd between 24.01 and 28.
        ppha = '1.16'.
      elseif pphd between 28.01 and 32.
        ppha = '1.32'.
      elseif pphd >= 32.
        ppha = '1.50'.
      endif.
    else.
      abs_pphd = abs( pphd ).
    if abs_pphd < 1.
        ppha = 0.
      elseif abs_pphd between 1 and 4.
        ppha = '-0.16'.
      elseif abs_pphd between 4.01 and 8.
        ppha = '-0.32'.
      elseif abs_pphd between 8.01 and 12.
        ppha = '-0.50'.
      elseif abs_pphd between 12.01 and 16.
        ppha = '-0.66'.
      elseif abs_pphd between 16.01 and 20.
        ppha = '-0.83'.
      elseif abs_pphd between 20.01 and 24.
        ppha = '-1.00'.
      elseif abs_pphd between 24.01 and 28.
        ppha = '-1.16'.
      elseif abs_pphd between 28.01 and 32.
        ppha = '-1.32'.
      elseif abs_pphd >= 32.
        ppha = '-1.50'.
      endif.
    endif.

  • Comparison Matrix for Logic Express and Logic Pro?

    I have looked everywhere for a chart that compares the features between these two products and can't find one.
    I am thinking of moving up from Garageband, and leaning toward Logic Express right now.
    Is there a comparison matrix somewhere?
    Thanks,
    Kirk

    I don't think so, but you can go to their respective Specs in Apple web-site and make one yourself.
    Basically, LE is the same thing as Logic Pro, but with less instrument/effects plugins and less audio/instrument loops content. Also, Logic Studio package has additional tools like Mainstage/Soundtrack Pro, which you may not need.
    As a sequencer and 3rd party plugin host LE is as powerful as Logic Pro.

Maybe you are looking for