LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scrolling down String programatically

Solved!
Go to solution

@Ranjeet_Singh wrote:

But I agree INF is better then STRLEN because it doesn't need calculate the strlen in each loop iteration

 


But can be done using string length. I think using strlen is better then infinite constant?


You seem to be agree on everything. 

If you are calculating string length every iteration then why not let constant folding ( using INF ) run its course?

 

0 Kudos
Message 11 of 17
(726 Views)

crossrulz wrote:


Did you read the thread that Hooovahh left earlier?  It is Darren, from NI R&D telling us to use it.


Exactly I agree but why it is better then strlen? This is my conern. Moving each time to INFINITY should not be recommeded I think?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 12 of 17
(710 Views)

Neos wrote:


But can be done using string length. I think using strlen is better then infinite constant?


You seem to be agree on everything. 

If you are calculating string length every iteration then why not let constant folding ( using INF ) run its course?

 


I think INF is better because in each iteration we dont need to calculate string length. From calculation point of view INF is better but according to better way of coding / actual way strlen is better.

 

Both 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 13 of 17
(708 Views)

@Ranjeet_Singh wrote:

I think INF is better because in each iteration we dont need to calculate string length. From calculation point of view INF is better but according to better way of coding / actual way strlen is better.

 

Both 



What does that even mean "better way of coding / actual way strlen is better".  Why do you think using the actual string length would be better than just using infinity?  You are just purely speculating with no reasoning presented to back your opinion up.

 

I can tell you that using string length is not better because you are using an extra CPU operation to measure the string length.  Now in reality, with modern computers, that is not going to be costly.

 

You seem to have a habit of making statements, yet continuing to argue that you think you are right, without any valid justifications, even when others point out that what you are saying doesn't make anysense.  It is tiresome.

 

You've had a lot of contributions to the forums that have helped a lot of people.  But then you occasionally going into these spells where you make these uninformed conjectures that are just coming out of La-La land.  It begins to undermine your credibility.

0 Kudos
Message 14 of 17
(666 Views)

I said both sounds Ok becuse each one of them have their own pros and cons and also I stated why as I think.


@Ranjeet_Singh wrote:

I think INF is better because in each iteration we dont need to calculate string length. From calculation point of view INF is better but according to better way of coding / actual way strlen is better.

 

Both 


INF-Calculation point of view in each iteration.

STRLEN- Instead of pointing to infinity pointing to valid value is more appropriate(And this works too).

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 15 of 17
(657 Views)

Better we stop here. Thanks for your time.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 16 of 17
(656 Views)

@Ranjeet_Singh wrote:

 

INF-Calculation point of view in each iteration.

STRLEN- Instead of pointing to infinity pointing to valid value is more appropriate(And this works too).


INF-Constant that the compiler can optimize how it sees fit usually with constant folding.  Value is just as "valid" as any other number for calculations.

STRLEN-Must be calculated each iteration.

 

BTW it is tiresome.

0 Kudos
Message 17 of 17
(641 Views)