Re: [jallib] Convert Ascii Digits String to word var help

2023-01-22 Thread flyway38
Hello Vasile,

Thank you for your input.
Will check that LIB.

Cheers,
FS

On Sunday, January 22, 2023 at 5:36:08 AM UTC vasile wrote:

> Hi Fellipe, 
> If the ascii string content is numbers 0 to 9, then perhaps you can use 
> function string_to_ dword from strings.jal library. 
>
> However I'm not sure is better than yours. It depends of what you try to 
> hit: best structured source code, fastest hex code or lowest hw stack.
> best wishes,
>
> On Sat 21 Jan 2023, 8:57 PM flyway38 
>> Hello to all,
>>
>> Am facing this task of converting to a word var, for use in some 
>> calculations, a value that is received as a ascii string, ex: "00800" that 
>> need it as a value of 800 in a word var.
>> Came up with this code below, but need some advice on a more efficient 
>> method to get same result.
>> Any ideas would be great.
>>
>> function AsciiStringToWord(byte IN str[]) return word is
>>-- Max LEN in str is 5 chars (Converting to word: max= 65535)
>>var word wRtn
>>var word len = count(str)
>>var byte i
>>var byte ii
>>--
>>for len using i loop -- Can be use STEP -1 ??
>>   --wRtn = wRtn + str[i]*(10^i) -- Can be used "^" for power 
>> operations ???
>>   -- This code would be enough 
>>
>>   -- Here my alternate code for same result
>>   case i of
>>   0: wRtn=wRtn+(str[5 - len + i]-48)
>>   1: wRtn=wRtn+(str[5 - len + i]-48)*10
>>   2: wRtn=wRtn+(str[5 - len + i]-48)*100
>>   3: wRtn=wRtn+(str[5 - len + i]-48)*1_000
>>   4: wRtn=wRtn+(str[5 - len + i]-48)*10_000
>>   end case
>>end loop
>> end function
>>
>> Thank you.
>>
>> Kind regards,
>> Filipe Santos
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "jallib" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jallib+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jallib/f3e04583-4ea7-4302-9273-220361de6874n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jallib+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/d2be79cb-bfc6-4c16-a134-627425aa875en%40googlegroups.com.


[jallib] [jallib build] buildbot success in jallib on jallib-standard

2023-01-22 Thread build
Hi guys,

This is buildbot speaking. I have finished a build of jallib-standard on jallib.
Buildslave for this Build: sebbot

Build Reason: 
Build Source Stamp: HEAD
Blamelist: mattschinkel

Build succeeded!
Logs are attached.

sincerely,
 -The Buildbot

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jallib+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/E1pJai1-0005yw-K1%40casadeyork.com.
Updating '.':

Atools/torelease_python2.5.py

Updated to revision 3886.

2792 samples to validate...

1173 libraries to validate...

All files validated :)

Environment config

JALLIB_ROOT=/home/mattschinkel/jallib/slave/standard/build

JALLIB_REPOS=/home/mattschinkel/jallib/slave/standard/build/include

JALLIB_SAMPLEDIR=/home/mattschinkel/jallib/slave/standard/build/sample

JALLIB_JALV2=/home/mattschinkel/bin/jalv2

JALLIB_PYTHON=python2.7



Time duration: 248 secs

jal jalv25r6 (compiled Oct 29 2021)

Required parameter to hex is missing!

no source file, use /home/mattschinkel/bin/jalv2 --help for help

Error while compiling file (status=1).

See previous message.

2792 samples to compile...

All samples compile :)

Environment config

JALLIB_ROOT=/home/mattschinkel/jallib/slave/standard/build

JALLIB_REPOS=/home/mattschinkel/jallib/slave/standard/build/include

JALLIB_SAMPLEDIR=/home/mattschinkel/jallib/slave/standard/build/sample

JALLIB_JALV2=/home/mattschinkel/bin/jalv2

JALLIB_PYTHON=python2.7



Time duration: 1912 secs