05-11-2017 01:37 PM
Hello guys,
I hope you can help me.
I want to sum all of price's codes. the input is "cod de bare" which changes while running (manually). I have tried autoindexing the prices but the output is an array with only one code.
When i run the program i'm changing the value of code (1234,1235, etc) and at the end i want to sum all of the prices for that codes.
Thanks !
05-11-2017 01:47 PM - edited 05-11-2017 01:51 PM
best to first parse the string into three arrays first, then do this.
05-11-2017 01:51 PM
Almost everybody "needs help" here, so please use a more accurate subject next time.
Please attach actual code containing typical default values in the controls. Pictures are difficult to debug.
You probably want to sum the prices in a shift register initialize with zero.
05-11-2017 01:58 PM
the reason youre only getting the value for the first code is because the for loop doesnt know your string is in an array format, it just looks at it like one string. and its using the same full spreadsheet string each iteration.
05-12-2017 02:21 AM
A better and faster solution would be 2 String to array, one for \n and then in a loop for Space. Then you can simply autoindex the row and index out the parts.
/Y
05-12-2017 03:06 AM
if this can help you. i'm interesedonly at the final when while loop runs continuously and i change the "cod de bare". I mean, i want to scan a bare code,thento press one buton from front panel and to sum all the prices for the bare codes.
05-12-2017 03:09 AM
later edit:
if you want to run the code, the password for operator "Andrei" is "andrei1".