Search found 32 matches

by Blurryan
Tue Jun 12, 2018 7:39 am
Forum: Coding Questions
Topic: Bit wise NOT behaviour
Replies: 7
Views: 1202

Re: Bit wise NOT behaviour

@Wilbert

Thanks. Understood. Need to tell the command what x is.
by Blurryan
Tue Jun 12, 2018 7:37 am
Forum: Coding Questions
Topic: Bit wise NOT behaviour
Replies: 7
Views: 1202

Re: Bit wise NOT behaviour

Code: Select all

x.b = %00000010
Debug RSet(Bin(x), 64, "0")
Debug "   "
Debug RSet(Bin(~x), 64, "0")
The above gives me the following:
0000000000000000000000000000000000000000000000000000000000000010

1111111111111111111111111111111111111111111111111111111111111101
by Blurryan
Tue Jun 12, 2018 7:29 am
Forum: Coding Questions
Topic: Bit wise NOT behaviour
Replies: 7
Views: 1202

Re: Bit wise NOT behaviour

Thanks Lord and firace,
@Lord - Thanks yes tried it thanks.

@ firace - no the problem exists with both .a as well as .u

Rgds
by Blurryan
Tue Jun 12, 2018 7:27 am
Forum: Coding Questions
Topic: Bit wise NOT behaviour
Replies: 7
Views: 1202

Re: Bit wise NOT behaviour

Problem resolves when I put length of Rset at 64 iso 8. It appears only the leftmost bits are being copied. So in a 32 bit m/c the length needs to be 32.
by Blurryan
Tue Jun 12, 2018 7:19 am
Forum: Coding Questions
Topic: Bit wise NOT behaviour
Replies: 7
Views: 1202

Bit wise NOT behaviour

x.b = %00000010
Debug RSet(Bin(x), 8, "0")
Debug " "
Debug RSet(Bin(~x), 8, "0")

x shows me a value of "00000010"
but
~x shows me a value of "11111111"

Shouldn't ~x show a value of "11111101"?

Can someone please explain why this is happening?
by Blurryan
Fri Jun 03, 2016 9:26 am
Forum: Coding Questions
Topic: Passing of variable to DLL not taking place
Replies: 7
Views: 993

Re: Passing of variable to DLL not taking place

Thanks DontTalkToMe for the Prototype example.

In some functions I am getting into about 12 to 15 variables and using Prototypes gets us all confused.

Let me work out a better example on my prototype "issue" and post it to the forum in the next week, so that you may have a look and suggest better ...
by Blurryan
Wed Jun 01, 2016 11:16 am
Forum: Coding Questions
Topic: Passing of variable to DLL not taking place
Replies: 7
Views: 993

Re: Passing of variable to DLL not taking place

Thanks @DontTalkToMe.

I was checking out what is the alternative to not using Prototypes.

Being not a very good programmer possibly the mess.

With prototypes although things become "neater", the length of a statement becomes huge when there are many variables being passed and becomes difficult to ...
by Blurryan
Wed Jun 01, 2016 10:37 am
Forum: Coding Questions
Topic: Passing of variable to DLL not taking place
Replies: 7
Views: 993

Re: Passing of variable to DLL not taking place (Solved) but

Ok. I think I understood. I need to pass a pointer to the DLL from the calling program.

Can someone vet if this is correct or is there something more to it?

Calling program for DLL as changed

If OpenLibrary(0, "Astro2_0.dll")
x.d = 1: y.d = 15: z.d = 30: zz.d = 31
Debug "01/01/0001 - " + StrD ...
by Blurryan
Wed Jun 01, 2016 10:14 am
Forum: Coding Questions
Topic: Passing of variable to DLL not taking place
Replies: 7
Views: 993

Passing of variable to DLL not taking place

Below is the DLL file, compiled as "Astro2_0.dll: and the second file is the calling program. The third file is a normal function call inside a normal program.

The function computes the Julian Day. The function takes 3 variables, day as double, and month and year as integers. In calling the DLL ...
by Blurryan
Fri Sep 04, 2015 6:24 am
Forum: Coding Questions
Topic: Comparing text in RTF or TXT files
Replies: 7
Views: 1983

Re: Comparing text in RTF or TXT files

Many thanks to Amílcar Matos Pérez, Vera and Dude, for taking interest in the algorithm.

I have worked on the algorithm to find the best solution and my program is given below.

My request to all is to see if the program can be written better and / or if there are any logical errors.
The purpose ...
by Blurryan
Sat Aug 22, 2015 12:14 pm
Forum: Coding Questions
Topic: Comparing text in RTF or TXT files
Replies: 7
Views: 1983

Re: Comparing text in RTF or TXT files

Hi Dude,

Was experimenting with the Levenshtein system you had suggested. Made a slight change to check words instead of characters and found that in one example the result was incorrect where the sequencing was similar but duplicated. The redone code is below for you to have a look. Please see the ...
by Blurryan
Fri Aug 21, 2015 5:49 am
Forum: Coding Questions
Topic: Comparing text in RTF or TXT files
Replies: 7
Views: 1983

Re: Comparing text in RTF or TXT files

Sorry everybody, was travelling and today am back on my seat. Shall go through your posts and get back to you by EOD.

Thanks for sharing your ideas.
by Blurryan
Sat Jul 11, 2015 4:50 am
Forum: Coding Questions
Topic: Comparing text in RTF or TXT files
Replies: 7
Views: 1983

Comparing text in RTF or TXT files

I have two texts one is the original material (ORG) and the other is the proof read material (CORR). I wanted to compare the two texts and have an output of the following:
Changed words: Those words that have changed with the addition or deletion of a character.
Added words: Those words that have ...
by Blurryan
Fri May 08, 2015 1:23 pm
Forum: Coding Questions
Topic: Using String value transfers from DLL Procedures
Replies: 8
Views: 1616

Re: Using String value transfers from DLL Procedures

Understood.
Thanks again.