mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 23:09:16 +02:00
codetools: added examples for c const
git-svn-id: trunk@14488 -
This commit is contained in:
parent
71c69f122b
commit
ceb551d1a8
@ -26,10 +26,10 @@
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
<PackageName Value="CodeTools"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="CodeTools"/>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
|
@ -141,6 +141,13 @@ unsigned long long unsigned_long_long;
|
||||
|
||||
#define MACRO_CONCATENATION(a,b) a##b
|
||||
|
||||
// const or not const
|
||||
const char a; // A constant character
|
||||
char const b; // A constant character (the same)
|
||||
char *const c; // A constant pointer to a character
|
||||
const char *const d; // A constant pointer to a constant character
|
||||
const char *e; // A pointer to a constant character. The pointer may be modified.
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -54,8 +54,10 @@ begin
|
||||
|
||||
CTool:=TCCodeParserTool.Create;
|
||||
try
|
||||
// pare C header file
|
||||
CTool.Parse(CCode);
|
||||
CTool.WriteDebugReport;
|
||||
|
||||
finally
|
||||
CTool.Free;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user