File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,24 @@ function SDL_JoystickNameForIndex(device_index: cint): PAnsiChar; cdecl;
210210 external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_JoystickNameForIndex' {$ENDIF} {$ENDIF};
211211```
212212
213+ ### Variadic Functions
214+ C:
215+ ``` c
216+ extern SDL_DECLSPEC void SDLCALL SDL_Log (const char * fmt, ...);
217+ ```
218+
219+ Pascal:
220+
221+ ```pascal
222+ procedure SDL_Log(fmt: PAnsiChar; Args: array of const); cdecl; overload;
223+ external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Log' {$ENDIF} {$ENDIF};
224+ procedure SDL_Log(fmt: PAnsiChar); cdecl; overload;
225+ external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Log' {$ENDIF} {$ENDIF};
226+ ```
227+ A variadic C function expands to two overloaded Pascal functions. One which
228+ has no variadic part and one which translates the variadic part (...) to an
229+ array of const.
230+
213231## C Macros
214232
215233Macros are pre-processed constructs in C which have no analogue in Pascal.
You can’t perform that action at this time.
0 commit comments