Author Topic: byval quad question.  (Read 146 times)

0 Members and 1 Guest are viewing this topic.

Brian Alvarez

  • Hero Member
  • *****
  • Posts: 697
    • PluriBASIC
byval quad question.
« on: February 22, 2021, 05:57:54 am »

 This new version 3.0 works wonders, but i noticed byval quad stopped working for 64 bits (crashes) while still working fine for 32 bits.

 Is this an error or is this by design?

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4461
    • Oxygen Basic
Re: byval quad question.
« Reply #1 on: February 22, 2021, 08:24:45 am »
Quad byval 64bit internal/external works ok for me. Something else causing the problem?

Brian Alvarez

  • Hero Member
  • *****
  • Posts: 697
    • PluriBASIC
Re: byval quad question.
« Reply #2 on: February 22, 2021, 06:50:55 pm »
Must be. Perhaps my code is wrong somewhere else. I was using this code:

Code: [Select]
FUNCTION ?opAND(byval quad v1, v2) as quad
  ' code irrelevant, as it was crashing also with no code here.
end function

This fixed it:

Code: [Select]
FUNCTION ?opAND(quad v1, v2) as quad
  ' code irrelevant, as it was fixed even with code here.
end function

 Does it matter if it is a macro that is added parameter of ?opAND? I was invoking it like this, i mean, this is the line that was crashing:

Code: [Select]
IF ?opAND((ISFALSE(area.lng(area.m(x - 1,y + 1), (4)))), (ISFALSE(area.lng(area.m(x,y + 1), (4))))) THEN
 This line also had the issue:

Code: [Select]
IF ?opAND((ISFALSE(GETASYNCKEYSTATE(?VK_Z))), (ISFALSE(GETASYNCKEYSTATE(?VK_X)))) THEN
ISFALSE is a macro:

Code: [Select]
FUNCTION ?ISFALSEFUNC(byval quad v) as int
    if v THEN
        return 0
    else
        return -1
    end if
END FUNCTION

MACRO ISFALSE int(r, i  t)
    quad t = (i)
    r = ?ISFALSEFUNC(t)
END MACRO

 But it had no issues when used everywhere else.

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4461
    • Oxygen Basic
Re: byval quad question.
« Reply #3 on: February 23, 2021, 02:44:30 am »
'?' is a cast operator meaning (sys)

Brian Alvarez

  • Hero Member
  • *****
  • Posts: 697
    • PluriBASIC
Re: byval quad question.
« Reply #4 on: February 23, 2021, 03:14:16 pm »
 It is the forum software changing the character. In reality i use a ? character.

Added:
Pfff. the preview lies. Hehe... I use ASCII 207, but the forum changes it to ?.

John

  • Hero Member
  • *****
  • Posts: 3892
Re: byval quad question.
« Reply #5 on: February 23, 2021, 03:16:51 pm »
Brian,

207 is not a printable character. (upper ascii control character) ? are used to signify unprintable.

I think it's time for another nap.  :)
« Last Edit: February 23, 2021, 05:03:57 pm by John »

Brian Alvarez

  • Hero Member
  • *****
  • Posts: 697
    • PluriBASIC
Re: byval quad question.
« Reply #6 on: February 23, 2021, 09:36:00 pm »
 Maybe it is just time for another forum software that supports displaying those charaters. ;D

 There is an extended ASCII table, look here: https://elcodigoascii.com.ar/

 Look for extended ASCII 207. Thats what i am using instead of the ? that the forum displays. In the Normal ASCII table it will be interpreted as character 164, but thats an n with a tilde, so... no, thats not the one im using.

 By the way, i stumbled upon a innofensive action that manages to crash the forums for like an hour... either that or it bans me for an hour. I think it may really be time for another forum software. ;D

John

  • Hero Member
  • *****
  • Posts: 3892
Re: byval quad question.
« Reply #7 on: February 23, 2021, 10:05:01 pm »
This is an Enhlish speaking forum. It does support a unicode DB but I chose to use standardy UTF8. Destructive bots are breaching most forums and CMS(Wordpress, Drupel, ...) turning them into spamming servers. I'm using ModSecuriry which bans IP's which try to breach the forum software after 3  time for an hour. It becomes permeate if they continue their attempts.

Can you tell me specifically what you were doing when you got IP banned for an hour? Send me your IP in a PM and I add it to the trust list.

DEBUG: Modify this post.
DEBUG: Modify again.
« Last Edit: February 23, 2021, 11:16:11 pm by John »

Brian Alvarez

  • Hero Member
  • *****
  • Posts: 697
    • PluriBASIC
Re: byval quad question.
« Reply #8 on: February 23, 2021, 10:50:25 pm »
I was correcting a grammar mistake. Did it twice. Then BAM! error 500 afterwards. For about 1 hour.

 Try it.. edit a post twice.
« Last Edit: February 23, 2021, 11:16:55 pm by Brian Alvarez »

Brian Alvarez

  • Hero Member
  • *****
  • Posts: 697
    • PluriBASIC
Re: byval quad question.
« Reply #9 on: February 23, 2021, 11:16:36 pm »
I will try now.

Edit 1 of 3...
Edit 2 of 3...
Edit 3 of 3...

 Have I succeded?

 Nice... no ban this time.
« Last Edit: February 23, 2021, 11:25:17 pm by Brian Alvarez »

John

  • Hero Member
  • *****
  • Posts: 3892
Re: byval quad question.
« Reply #10 on: February 23, 2021, 11:37:06 pm »
I had to disable a couple of the OWASP rules that were being overly picky when editing posts.

Let me know if you experience any further IP bans. Thanks for the heads-up. I have my IP as trusted so I never saw it.  :-\

Unfortunately if I don't make my IP trusted it's like locking your keys in your car. The only way I can get back in right away and not ban myself for an hour is use my cell phone and mobile data to log into Plesk and unban me.   8)
« Last Edit: February 24, 2021, 12:12:28 am by John »