Actual type of variable type in parameterized type

Hi all,
Is there way to find out what is actual type of the Variable type in Parameterized type, for example:
class A<T> {
     //actual type of variable type T
     Class<T> tClass;
     public void setTClass() {
          // I don't know what should I do here
     public Class<T> getTClass() {
          return tClass;
     public static void main(String[] args) {
          assert((new A<Integer>().getTClass()).toString().equals("class java.lang.Integer"));
Message was edited by:
MjLaali
Message was edited by:
MjLaali
Message was edited by:
MjLaali

yes ofcource I can't chenge the actual type of variable type T in run time, but I would like to get actual class of T in run time like this example :
package test;
import java.lang.reflect.ParameterizedType;
abstract class B<T>{
     private Class<T> variableClass;
     public B() {
          this.variableClass = (Class<T>) ((ParameterizedType) getClass()
                    .getGenericSuperclass()).getActualTypeArguments()[0];
     public Class<T> getTClass(){
          return variableClass;
class A extends B<Integer> {
     public static void main(String[] args) {
          assert(new A().getTClass() == Integer.class);
but I don't want class A and I would like to move main method to class B.

Similar Messages

  • Chnfind unable to find the decimal type by variable and sometimes "Round" command

    Dear all,
    During the work with Diadem I got two troubles. Could you please take a look and show me the wrong if you find the issue?
    1.) Here is my trouble as we see the photo below. It is most important problem which I have. I really have no idea why it could happened. It is alway happened to find a value with decimal type's variable, and even that variable is changed  to "str()".
    setlocale("en-gb")
    dim Min_point,Index_low,result
    Min_point=val(Data.Root.ChannelGroups(1).Channels("CopyYangle").Properties("minimum").Value)
    Min_point=round(Min_point,6)
    Min_point=str(Min_point)
    msgbox("The Min.Value is: "&Min_point)
    Index_low=Chnfind("ch(""CopyYangle"")<="&Min_point&"", 1)
    msgbox("Index No. of Min. Value is: "&Index_low)
    Index_low=Chnfind("ch(""CopyYangle"")<=-0.11374 ", 1)
    msgbox("Index No. of Min. Value is: "&Index_low)
    2.) Still the problem with ChnFind()  or  ChnFindreverse().   If I change the Rounds off a number to the nearest integer with the function "Round()" it might not work in ChnFindreverse(). Such like it works under 4, 6, 8 and even 7 but doesn't work with 3 and 5. Is this logical?
    setlocale("en-gb")
    Dim XE, Xchannel, Ychannel,round_N0
    Xchannel = "[2]/Right"
    T1 = Xchannel
    R1 =val(Data.Root.ChannelGroups(2).Channels("Right").Properties("maximum").Value)
    round_N0=4 ' <========= 3 and 5 Not work, 4, 6, 7, 8 .... work
    R1 =round(R1,round_N0) ' <=========
    msgbox("Max. point is: " &R1 &VbCrlf& "Round Nr is: "&round_N0)
    L1 = ChnFindReverse ("Ch(T1)>=R1",0)
    msgbox("Index number for Max.Point is: "&L1 &VbCrlf& "Round Nr is: "&round_N0)
     .tdx is a valid extensions for an attachement?
    If you couldn't open the TMD file. Please remove ".tdv" the attacments file name to make sure it is "ChnFind.tdx" but not "ChnFind.tdx.tdv".
    Kind regards / Mit freundlichen Grüßen
    J.Huang
    Attachments:
    ChnFind.TDM ‏5 KB
    ChnFind.tdx.tdv ‏39 KB

    Hello J.Huang,
    I downloaded the files and was able to get it to work. It looks like when you format the minimum value to a string, you loose precision and then ChnFind doesn't find the value your are looking for. He is an example which worked for me :
    Set oChnY = Data.Root.ChannelGroups(2).Channels("Right")
    sgValue = str(oChnY.Properties("minimum").Value,"d.ddddddddddddddd")
    Index = ChnFindReverse("Y<="&sgValue,,Array("Y"),Array(oChnY))
    LogFileWrite(Index)
     Using symbols (parameters 3 and 4) is not necessary to get the solution. The key is teh second value for "str" which formats using more digits. As soon as you reduce the number of digits, you may no longer get a result.
    Ther is an alternative to ChnFind, in case there is only one occurance in teh signal which has the minimum value
    Set oChnY = Data.Root.ChannelGroups(2).Channels("Right")
    Index = PNo(oChnY,oChnY.Properties("minimum").Value)
    LogFileWrite(Index)
     I hope one of the two options works for you. I tested the approach with teh first channel too and it worked as well

  • Is it possible to compare two parameters type dateTime in switch- component

    Hello,
    i have a synchronouse prozess with one switch component. In the switch component i want to compare to parameters type dateTime. While execute the prozess alwayse the <otherwise>- sector is executed, but never the sector with the condition. But the condition is fulfilled.
    Can it be, that a comparison in a switch-component doesn't work while using two parameters with type dateTime?
    If it is so, has anybody an idea, how to compare two dateTimes without using the character dateTime?
    I'll be very happy about a helpfull advice.
    Thanks and regards,
    rala

    Hi Rala,
    this example works perfectly for me.
    IMHO doesn't matter how to assign values to dateTime variables.
    <scope name="Scope_timeDate">
    <variables>
    <variable name="aktCas" type="xsd:dateTime"/>
    <variable name="casDuration" type="xsd:dateTime"/>
    </variables>
    <sequence name="Sequence_1">
    <assign name="Assign_datesTimes">
    <copy>
    <from expression="xp20:current-dateTime()"/>
    <to variable="aktCas"/>
    </copy>
    <copy>
    <from expression='"2002-05-30T09:00:00"'/>
    <to variable="casDuration"/>
    </copy>
    <copy>
    <from expression="'before'"/>
    <to variable="rtn"/>
    </copy>
    </assign>
    <switch name="Switch_1">
    <case condition="bpws:getVariableData('aktCas') &gt; bpws:getVariableData('casDuration')">
    <assign name="Assign_ok">
    <copy>
    <from expression='"IF"'/>
    <to variable="rtn"/>
    </copy>
    </assign>
    </case>
    <otherwise>
    <assign name="Assign_otherwise">
    <copy>
    <from expression='"otherwise"'/>
    <to variable="rtn"/>
    </copy>
    </assign>
    </otherwise>
    </switch>
    </sequence>
    </scope>
    Regards,
    Ivan

  • What is the name of a nested parameterized type?

    The draft spec gives an example of a nested parameterized class Zipper<B> inside a parameterized class Seq<A>. In the sample code the nested type is refered to as Seq<String>.Zipper<Number>. Hence I concluded that the following should work either:
    package generics;
    public class RawTypes {
    private static class Outer<T> {
    public class NonstaticInner<T> {}
    public static void main(String[] args) {
    Outer[] x = new Outer<String>();
    Outer<String>.NonstaticInner<String> var = x.new NonstaticInner<String>();
    Instead the compiler complains:
    incompatible types
    found : generics.RawTypes.Outer.NonstaticInner<java.lang.String>
    required: generics.RawTypes.Outer<java.lang.String>.NonstaticInner<java.lang.String>
              Outer<String>.NonstaticInner<String> var = x.new NonstaticInner<String>();
    When I use the raw outer type the compiler is happy. Like in:
    Outer.NonstaticInner<String> var = x.new NonstaticInner<String>();
    But that is not what I want say.
    Why does this fail to compile? Because the outer class is a nested static class instead of a top-level class? That should not make a difference, I would think. What am I missing?
    Angelika

    I am quite surprised there is no reaction at your query.
    It made me so interested in the spec I downloaded it.
    At page 3 I read that no static meber could be parametrized.
    I think this makes the behaviour of the compiler correct.No, I don't think so. The spec says:
    "The scope of a type parameter is all of the declared class, except any static members or initializers, but including the type parameter section itself."
    The spec does not say that static members could not be parameterized. It just says that the type parameter of a generic class cannot be used in any static members of that generic class, be it a static method or a static initializer or the declaration of a static field or a nested static class.
    Stuff like this would be prohibited under the quoted wording:
    class X<T> {
    static T field;
    static T getField() { ... }
    static { T tmp; ... }
    static class Y { T t; }
    What I tried is not prohibited by anything in the spec, I believe. I simply defined a generic type (Outer) inside a nongeneric type (RawTypes):
    public class RawTypes {
    private static class Outer<T> {
    public class NonstaticInner<T> {}
    The weird thing is that the nested generic type RawTypes.Outer<T> behaves differently from a top-level generic type. Compare the above to the following:
    public class Outer<T> {
    public class NonstaticInner<T> {}
    According to the spec I would refer to the class nested into class Outer<T> as Outer<String>.NonstaticInner<Integer>, for instance. That's basically the example on page 4 of the spec, where they have a Seq<String>.Zipper<Number>.
    Why is the behavior entirely different when I want to refer to a class nested into RawTYpes.Outer<T>? Why can't I say RawTypes.Outer<String>.NonstaticInner<Integer>? Why do I have to name it RawTypes.Outer.NonstaticInner<Integer>? That does not make sense to me.
    A nested static type is like a top-level type, except that is has a name prefix. Why would that change with the addition of generics to the language?
    Outer.NonstaticInner<String> var = x.new
    NonstaticInner<String>();
    But that is not what I want say.What is it then that you want to say?
    Do you want to confine the valid values of var to outer classes parametrized with the
    String type? This will lead to problems (I think even with instances) as there is
    no specific type for a parametrized class.What error would you expect when a variable
    is passed having the correct "inner parameter type" but not the requested outer parameter type?I would expect the same error message that I would get when I assigned a Seq<String>.Zipper<Number> to a Seq<Integer>.Zipper<Number>. No?
    Maybe it's just a bug in the prototype compiler, but who can tell if the spec does not say much about nested types what their names would be.
    Angelika

  • Modbus register readings, double type Shared Variable 32000

    Hello
    I am new to labview and modbus and have been trying to communicate with a control card using the VIs in the standard modbus library in labview 8. This might be a very simple question, it relates to the output of the "read holding register" or "function code 0x03" . All the results I have been getting are in 5 digit decimal form, I have read in another post that this may be the "double type Shared Variable" and that it can be converted or typecasted to "ieee 754 type" i.e. as actual measurement values. I was wondering if it is possible for 5 digit "double type shared variable" that are greater than the 32000, i.e such as 50119 or 50294, to be converted to "ieee 754 type". Or even if there are standard methods that can perform this type of conversion in general.
    Thanks in advance

    Maybe this will help.
    http://forums.mrplc.com/index.php?showtopic=30
    http://www.simplymodbus.ca/FAQ.htm#Types
    What are data types?
    The example for FC03 shows that register 40108 contains AE41
    which converts to the 16 bits 1010 1110 0100 0001
    Great! But what does it mean? Well, it could mean a few things.
    Register 40108 could be defined as any of these 16-bit data types:
         A 16-bit unsigned integer (a whole number between 0 and 65535)
                        register 40108 contains AE41 = 44,609 (hex to decimal conversion)
         A 16-bit signed integer (a whole number between -32768 and 32767)
                                                            AE41 = -20,927
                  (hex to decimal conversion that wraps, if its over 32767 then subtract 65536)
         A two character ASCII string (2 typed letters)
                                                            AE41 = ® A
         A discrete on/off value (this works the same as 16-bit integers with a value of 0 or 1.
                                                  The hex data would be 0000 or 0001)
    Register 40108 could also be combined with 40109 to form any of these 32-bit data types:
         A 32-bit unsigned integer (a number between 0 and 4,294,967,295)
                                 40108,40109 = AE41 5652 =  2,923,517,522
         A 32-bit signed integer (a number between -2,147,483,648 and 2,147,483,647)
                                                           AE41 5652 = -1,371,449,774
          A 32-bit double precision IEEE floating point number.
          This is a mathematical formula that allows any real number (a number with decimal
           points) to represented by 32 bits with an accuracy of about seven digits.
                                                           AE41 5652 = -4.395978 E-11
          Here is a spreadsheet IEEE float calculator for inputs of 4 bytes or 2 words.
          To download a copy, right click and select Save Target As...
         A four character ASCII string (4 typed letters)
                                                             AE41 5652 = ® A V R
    More registers can be combined to form longer ASCII strings.  Each register being used to store two ASCII characters (two bytes).

  • Can Enum parameterized type implement an interface?

    I am trying to define a class that is parameterized with an Enum and the parameterized Enum must implement an interface. Here is some code:public interface MatchingEnum<E> {
        String match(); // This interface is not yet complete
    public class EnumField<E extends Enum<E> & MatchingEnum<E>> {
        private E enumeration;
        public EnumField(E enumeration) {
            this.enumeration = enumeration;
        private static class Test {
            EnumField<TestType> c;
        public enum TestType implements MatchingEnum<TestType> { One, Two, Three;
            public String match() {
                return null;
    }The problem is that the compiler complains that "classes cannot directly extend java.lang.Enum". If I delete the interface for the parameterized type(below) it compiles fine. Why can't the compiler handle this? Does specifying an Interface for an Enum bounds (E) force it to directly extend Enum? If so, why does the actual Enum compile?public class EnumField<E extends Enum<E>> {Blah, blah, blah... // This compiles
    public class EnumField<E extends Enum<E> & MatchingEnum<E>> {Blah, blah blah... // This does NOT compile

A: Can Enum parameterized type implement an interface?

Compiled from "EnumField.java"
public class com.dartcontainer.mdc.picaps.textui.screen.widget.EnumField extends java.lang.Object{
public com.dartcontainer.mdc.picaps.textui.screen.widget.EnumField(java.util.List);
  Code:
   0:   aload_0
   1:   invokespecial   #2; //Method java/lang/Object."<init>":()V
   4:   aload_0
   5:   aload_1
   6:   putfield        #1; //Field enumeration:Ljava/util/List;
   9:   return
public static void main(java.lang.String[]);
  Code:
   0:   new     #3; //class com/dartcontainer/mdc/picaps/textui/screen/widget/EnumField$Test
   3:   dup
   4:   aconst_null
   5:   invokespecial   #4; //Method com/dartcontainer/mdc/picaps/textui/screen/widget/EnumField$Test."<init>":(Lcom/dartcontainer/mdc/picaps/textui/screen/widget/EnumField$1;)V
   8:   astore_1
   9:   getstatic       #5; //Field java/lang/System.out:Ljava/io/PrintStream;
   12:  new     #6; //class java/lang/StringBuilder
   15:  dup
   16:  invokespecial   #7; //Method java/lang/StringBuilder."<init>":()V
   19:  ldc     #8; //String t.m =
   21:  invokevirtual   #9; //Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
   24:  aload_1
   25:  getfield        #10; //Field com/dartcontainer/mdc/picaps/textui/screen/widget/EnumField$Test.m:Ljava/lang/String;
   28:  invokevirtual   #9; //Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
   31:  invokevirtual   #11; //Method java/lang/StringBuilder.toString:()Ljava/lang/String;
   34:  invokevirtual   #12; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
   37:  return
static java.util.List access$100(com.dartcontainer.mdc.picaps.textui.screen.widget.EnumField);
  Code:
   0:   aload_0
   1:   getfield        #1; //Field enumeration:Ljava/util/List;
   4:   areturn
}

Compiled from "EnumField.java"
public class com.dartcontainer.mdc.picaps.textui.screen.widget.EnumField extends java.lang.Object{
public com.dartcontainer.mdc.picaps.textui.screen.widget.EnumField(java.util.List);
  Code:
   0:   aload_0
   1:   invokespecial   #2; //Method java/lang/Object."<init>":()V
   4:   aload_0
   5:   aload_1
   6:   putfield        #1; //Field enumeration:Ljava/util/List;
   9:   return
public static void main(java.lang.String[]);
  Code:
   0:   new     #3; //class com/dartcontainer/mdc/picaps/textui/screen/widget/EnumField$Test
   3:   dup
   4:   aconst_null
   5:   invokespecial   #4; //Method com/dartcontainer/mdc/picaps/textui/screen/widget/EnumField$Test."<init>":(Lcom/dartcontainer/mdc/picaps/textui/screen/widget/EnumField$1;)V
   8:   astore_1
   9:   getstatic       #5; //Field java/lang/System.out:Ljava/io/PrintStream;
   12:  new     #6; //class java/lang/StringBuilder
   15:  dup
   16:  invokespecial   #7; //Method java/lang/StringBuilder."<init>":()V
   19:  ldc     #8; //String t.m =
   21:  invokevirtual   #9; //Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
   24:  aload_1
   25:  getfield        #10; //Field com/dartcontainer/mdc/picaps/textui/screen/widget/EnumField$Test.m:Ljava/lang/String;
   28:  invokevirtual   #9; //Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
   31:  invokevirtual   #11; //Method java/lang/StringBuilder.toString:()Ljava/lang/String;
   34:  invokevirtual   #12; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
   37:  return
static java.util.List access$100(com.dartcontainer.mdc.picaps.textui.screen.widget.EnumField);
  Code:
   0:   aload_0
   1:   getfield        #1; //Field enumeration:Ljava/util/List;
   4:   areturn
}

  • Extending a parameterized type

    Hi,
    I have a Shape class like this
    public abstract class Shape<T extends Comparable<T> & Cloneable> {
    public abstract void draw( Graphics g );
    Now I extend it like this
    public class GraphicLine<T extends Comparable<T> & Cloneable> extends Shape{
    private int x, y;
    public void draw( Graphics view ){
    //TODO
    // Default ordering
         public int compareTo( T shape ) {
    It seems this depends on the combination of two things. The actual inheritance of the class (which is according to the old rules ) and the inheritance of the parameterized type.
    I want my shapes to be cloned and compared with other shapes. The line
    public class GraphicLine<T extends Comparable<T> & Cloneable> extends Shape
    is used because it seems to serve my purpose eventhough the line
    public class GraphicLine extends Shape compiles. I don't understand the difference though. I am guessing that the second line will lose the type constraint I have established in the super type ??
    My other doubt is the compareTo method. Can anybody comment on this ? I want my lines to be compared based on the start and end points. The code compiles.
    Thanks
    Mohan

    Thanks. Yes. I did that but still have doubts
    Does the line
    public class GraphicLine<T extends Comparable<T> &
    Cloneable> extends Shape<T>
    mean that T on both sides of the 'extends' keyword
    are linked ? Is that the reason why it is Shape<T>
    and not Shape< T extends Comparable<T>?Yes, now the T on both sides of the 'extends' is known by the compiler to refer to the same type. The class being extended uses the simple declaration in extended class declarations. It's important to realize that the bounds imposed on the args to the base class are passed on to all derived classes: if Shape expects that all of its parmtypes are Comparable, then there is no way for you to declare any derived class of Shape without passing on that restriction.
    Now my method is
         public int compareTo( T shape ) {
         GraphicLine<T> line = ( GraphicLine<T> )shape;
    and it compiles.
    It'll compile, but I'd be suprised if a call to this method ever succeeds: it appears at first glance that it'll throw ClassCastException every time. In your declaration, T is Comparable but GraphicLine is not. Your method requires an object that is Comparable and Clonable, and GraphicLappears to be neither. If you're expecting to compare GraphicLines, then that's what you need to declare in the interface of the compareTo method.
    public int compareTo( GraphicLine<T> shape ) { ... }

  • Getting error while creating the variable of Schema Element type

    Hi everybody,
    For creating a variable of schema element type I am doing the following steps...
    Select 'Variables' after right clicking on bpel process. IN this window, go to 'Create VAriable' then select 'Element' type. Now in Type Choose, I expanded the my imported schema files. And selected a element type, then click ok to create this variable... I am getting the message...
    IN ORDER TO SAVE IMPORTED WSDL/SCHEMA FILES, YOU MUST HAVE A PARTNER LINK LOCATED UNDER THE CURRENT PROJECT DIRECTORY.
    What is mean by that.
    I have imported the schema files in project. AFter that I have imported them into the WSDL also. Now why I am getting error while creating the variable. However I can create variable directly in .BPEL file then everything is fine. And it is working also. But what is mean with the above error? Why I am not able to create variable through GUI?
    Thanks.

    Hi,
    I have this same problem this morning, and I was going crazy, until I found this webpage on the internet:
    [http://technology.amis.nl/blog/1803/problem-importing-xml-schema-in-bpel-process|http://technology.amis.nl/blog/1803/problem-importing-xml-schema-in-bpel-process]
    The idea is that the jdeveloper is not very good working with directories with spaces on the directory name. If you move all your work to a directory without spaces, it will work smoothly. At least, it had worked for me.
    Regards,
    Nacho

  • [svn] 4136: Find loop variables initialized with "weak" types, e.g., NULL or VOID, and

    Revision: 4136
    Author: [email protected]
    Date: 2008-11-18 14:50:38 -0800 (Tue, 18 Nov 2008)
    Log Message:
    Find loop variables initialized with "weak" types, e.g., NULL or VOID, and
    use the variable type used within the loop to normalize the local's type.
    Modified Paths:
    flex/sdk/trunk/modules/asc/src/java/adobe/abc/GlobalOptimizer.java

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • Passing Session variable of DATE data type to opaque view filter

    Hi Everyone,
    Can you guys please help me in passing session variable of DATE data type in RPD's physical layer 'opaque view' filter for Oracle database
    I tried following syntax, syntax wise I didn't got getting any error, but at the same time this opaque view is not fetching any records as well. my session variable is "END_DATE" and its value is 1998/12/31:00:00:00(as shown in RPD session windows, datatype is DATETIME)
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TIME_ID =TO_DATE( 'VALUEOF(NQ_SESSION.END_DATE)','MM/DD/YYYY')
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TIME_ID = TO_DATE( 'VALUEOF(NQ_SESSION."END_DATE")','MM/DD/YYYY')
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TRUNC(TIME_ID) = TO_DATE( 'VALUEOF(NQ_SESSION."END_DATE")','MM/DD/YYYY')
    In past, I was able to pass a session variable into a opaque view filter using DATEOF function, but that was in DB2.
    I appreciate your time and help

    Finally, I got right format. here it is
    to_date(substr('valueof(NQ_SESSION.END_DATE)',1,10), 'yyyy-mm-dd')
    and here is the source from where I got this information
    Using OBIEE Session Variables in Select Tables in the Physical Layer

  • How to get data type of variable in program..

    Hi ABAP Guru.
    I need to know how to get data type of variable or any structure field.. because I got short dump when use command REPLACE ALL OCCURANCE ... with variable/structure field that has data type I or P, I think it should be used with data type CHAR only, So I need to check the data type first.
    Please give me your advice
    Thank you all.
    Nattapash C.

    data : v_value type i,
             v_char(10) type c.
    v_value = 10.
    move v_value to v_char.
    REPLACE ALL OCCURRENCES of '#' from v_char....
    Best regards,
    Prashant

  • Japanese characters alone are not passing correctly (passing like ??? or some unreadable characters) to Adobe application when we create input variable as XML data type. The same solution works fine if we change input variable data type to document type a

    Dear Team,
    Japanese characters alone are not passing correctly (passing like ??? or some unreadable characters) to Adobe application when we create input variable as XML data type. The same solution works fine if we change input variable data type to document type. Could you please do needful. Thank you

    Hello,
    most recent patches for IGS and kernel installed. Now it works.

  • Why string type shared variable takes more time to update in the client

    I am using shared variables to share the data across a master and the client PCs connected in a network. (Network published & no buffering)
     I have created an integer type shared variable(I32) and a string type shared variable (data size is 60 bytes) in the Master and subscribing to the same in the client PCs. In the master PC, I am modifying the data in this order - update the data in the string type variable and then update the data in the integer vaiable.
    But in the client PCs, due to the size difference in the variables, I am receiving the data of the integer first and after that about 3-4 sec later only I am receiving the string data. Can any optimization be done to reduce this latency period? Instead of the string data type any better data type will reduce this delay?
    Please suggst. Advnced thanks.

    Latency has a lot to do with your network.  3-4 seconds is a long time though.  This could also be due to the larget data size of your string.  The integer data size is definitaly not 60 bytes.  If you're looking for better performance, I would highly recommend looking into Datasocket communication or TCP/IP communication.  (There are shipping example for both.)
    When it comes to performance of throughput and efficiency, network-published variables are lower on the totem pole.
    I hope this helps,
    Kevin S.
    Applications Engineer
    National Instruments

  • Variable Decimal of Packed Type Variable: is this possible?

    Hi Experts,
    I'd like to ask if we can have a packed variable with the decimal declaration as variable also, like:
    DATA p_pack_var TYPE p DECIMALS g_var_decimal.
    The scenario is there is a field qamv-toleranzun which I want to be displayed like in the output in QP03. The display in QP03 has variable decimals according to the value in qamv-masseinhsw.
    So for example: qamv-masseinhsw = 3 and qamv-toleranzun is a floating type value, the output in QP03 is format with 3 decimals.
    Or if this is not possible, are there any approach to pass the value of the floating point variable to a decimal type variable with an indefinite decimal places.
    Please Help. Points will be rewarded for valid answers.
    Thanks!

    Is this what you want?
    searchComponents( Class a_class) {
    // browse components
    if (a_class.isInstance(component)) {
    // do something
    }

  • How to declare a bind variable with 'date' data type in command prompt?

    how to declare a bind variable with 'date' data type in command prompt?
    sql>variable q date;
    when i execute it show list of datatypes

    Hi,
    As Lokanath said, there are no DATE bind variables.
    You can use a VARCHAR2 bind variable, and convert it to a DATE in your SQL statment.
    If you're using SQL*Plus, consider a substitution variable. It won't be as efficient as a bind variable, but it will be as convenient.
    For example:
    DEFINE  first_entrry_date = "DATE '2010-06-20''
    SELECT   ...
    WHERE   entry_date >= &first_entry_date
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Maybe you are looking for