<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Marcel,<br><div dir="ltr"><br></div><div dir="ltr"><br><blockquote type="cite">On May 29, 2020, at 4:40 AM, Marcel Taeumel <marcel.taeumel@hpi.de> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        My bad. Of course, we write 'longlong' and not 'long long' in the definition of external structures.<div><br></div><div>Still, that question of constency is still valid. </div><div><br></div><div>(Even though ExternalType has not yet support for generating the C type cast yet.)</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 29.05.2020 13:06:24 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">Hi, there!<div class="mb_sig"></div><div><br></div><div>Here is a question of consistency. :-)</div><div><br></div><div>In the definition of external structures, we write 'long' or 'long long'.</div><div>In the definition of external pools, we write #Integer.</div><div><br></div><div>The latter is automatically converted into a "(long long)" cast for printf.</div><div><br></div><div>What is the better approach? I think it would be better to also write 'long' or 'long long' when defining external pools:</div><div><br></div><div><ffiVariable: MY_CONSTANT type: 'long long'></div><div>instead of</div><div><span style="font-size: 13.3333px"><ffiVariable: MY_CONSTANT type: #LargePositiveInteger></span><br></div><div><br></div><div>Would make it easier to define platform-specific differences.</div><div><br></div></div></div></blockquote></div></div></blockquote><div><br></div>IIRC the C standard is clear on the types of integer constants.  A plain constant has type int.  A constant with a single L at the end has type long and one with LL at the end has type long long. UL and ULL suffixes give unsigned long and unsigned long long.  So and generated program to yield the values should yield both the integer value and the strong representation of the value and tndd the type should be inferred from that.<br><blockquote type="cite"><div dir="ltr"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000"><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px"><div style="font-family:Arial,Helvetica,sans-serif"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000"><div>Best,</div><div>Marcel</div></div></div></blockquote></div><span></span><br></div></blockquote></body></html>