PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: va_first() Unsupported statement  (Read 132 times)

jermy

  • Junior Member
  • **
  • Posts: 60
va_first() Unsupported statement
« on: September 02, 2020, 02:41:27 PM »

Dear people,

This line wont compile
Code: [Select]
ap = va_first()   when i want to use Win64, it's okay with Win32.
the compiler says:  error 286: Unsupported statement in -gen gcc mode

Code: [Select]

'------------------------------------------------------------------------
sub glPrint cdecl(byval x as integer, byval y as integer, byref fmt as string, ...)    '' Where The Printing Happens
dim text as string * 256                           '' Holds Our String
dim ap as any ptr                                  '' Pointer To List Of Arguments

'' If There's No Text
' if len(fmt)= 0 then                                '' Do Nothing
' exit sub
' end if

ap = va_first()                                   '' get pointer to first arg
' vsprintf (text, fmt, ap)                          '' And Converts Symbols To Actual Numbers


' glBindTexture (GL_TEXTURE_2D, textures(9).texID)  '' Select Our Font Texture
' glPushMatrix ()                                   '' Store The Modelview Matrix
' glLoadIdentity ()                             '' Reset The Modelview Matrix
' glTranslated (x, y, 0)                        '' Position The Text (0,0 - Bottom Left)
' glListBase (bbase - 32)                       '' Choose The Font Set
' glCallLists (strlen (text), GL_UNSIGNED_BYTE, strptr(text))   '' Draws The Display List Text
' glPopMatrix ()                                    '' Restore The Old Projection Matrix
end sub


Thanks in advance for your help
Logged

Josť Roca

  • Guru Member
  • *****
  • Posts: 3282
Re: va_first() Unsupported statement
« Reply #1 on: September 02, 2020, 03:25:56 PM »

As the error message says, it is not supported in 64-bit.

Try with the new cva_xxx built-in macros:
See: https://www.freebasic.net/wiki/KeyPgCvaList

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: va_first() Unsupported statement
« Reply #2 on: September 02, 2020, 03:30:43 PM »

Josť beat me to it.  cva_arg

 
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer