Author Topic: dup?  (Read 148 times)

HSE

  • Member
  • *****
  • Posts: 1822
  • AMD 7-32 / i3 10-64
dup?
« on: November 21, 2021, 11:02:00 AM »
Hi Biterider!

Is working this line in your development version:
Code: [Select]
DefineVariable  xName, CHR, 32 dup (0)

Thanks, HSE.
Mathematics in Assembly: SmplMath

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 782
  • ObjAsm Developer
    • ObjAsm
Re: dup?
« Reply #1 on: November 21, 2021, 05:19:24 PM »
Hello HSE
I have an issue here with the spacing between "dup" and "(".
Write it this way

Code: [Select]
DefineVariable  xName, CHR, 32 dup(0)
Biterider

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 782
  • ObjAsm Developer
    • ObjAsm
Re: dup?
« Reply #2 on: November 21, 2021, 05:35:07 PM »
Hi HSE
To fix the issue replace lines 1180-1190 form objects.inc with:

Code: [Select]
          $$sz4 textequ <$Lower($$sz3)>                 ;;Convert to lowercase
          ??Pos1 = @InStr(1, %$$sz4, < dup>)
          if ??Pos1 gt 0
            if @InStr(1, %$$sz4, <{>) gt 0
              $$sz1 $$sz2 @CatStr(@SubStr(%$$sz3, 1, ??Pos1), < dup({})>)
            else
              $$sz1 $$sz2 @CatStr(@SubStr(%$$sz3, 1, ??Pos1), < dup(?)>)
            endif
          else
            $$sz1 $$sz2 ?
          endif

That should make it.

Biterider

HSE

  • Member
  • *****
  • Posts: 1822
  • AMD 7-32 / i3 10-64
Re: dup?
« Reply #3 on: November 22, 2021, 04:59:22 AM »
Hi Biterider!!

Look like that work  :thumbsup:

Now I can see other problem:
Code: [Select]
Error A2153: Initializer must be a string or single itemStill I don't know where that came from.

Nothing of this happen with a more stable version (stable version + some additions).

Thanks, HSE.
Mathematics in Assembly: SmplMath

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 782
  • ObjAsm Developer
    • ObjAsm
Re: dup?
« Reply #4 on: November 22, 2021, 07:06:07 AM »
Hi HSE
Quote
Still I don't know where that came from.
Without the source, there is not much I can do to find the problem  :sad:

Maybe revert the change and eliminate the space between "dup" and "(" and check if the error message is gone.

Biterider

HSE

  • Member
  • *****
  • Posts: 1822
  • AMD 7-32 / i3 10-64
Re: dup?
« Reply #5 on: November 22, 2021, 11:26:34 AM »
Hi Biterider!

UASM still is making bad error reports. AsmC show problem in a second  :biggrin:

Nothing related with dup  :thumbsup:.

There is a compatibility problem with union added in DEF_COMBOBOX structure.

Thanks, HSE.
Mathematics in Assembly: SmplMath