<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><div>In fortran I'm using the following structure to check the type of<br />an incoming variable:<br /><br />    SELECT TYPE (myvar)<br />    TYPE IS (mytype)<br />      ...<br />    END SELECT<br /><br />Here IS is a fortan intrinsic, so far so good. However, when I<br />add a petsc index set as follows<br /><br />    #include "petsc/finclude/petscksp.h"<br /><br />    use petscksp, only: tIS<br /><br />    IS :: myIS<br /><br />the compiler gets confused and thinks that the intrinsic fortran<br />IS is the petsc index set IS, and errors-out on the SELECT<br />TYPE: <br /><br />    error #8245: SELECT TYPE statement must be immediately followed by CLASS IS, TYPE IS, CLASS DEFAULT or END SELECT statement.<br />        SELECT TYPE (myvar)<br />    ----^<br />    error #6410: This name has not been declared as an array or a function.   [TYPE]<br />        TYPE type(tIS) (mytype)<br />    ---------^<br />    compilation aborted<br /><br />What would be the right way to deal with this problem?<br /></div><div dir="ltr" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:100%;font-size:1px;direction:ltr;"><table dir="ltr" cellpadding="0" cellspacing="0" border="0" style="width:100%;direction:ltr;border-collapse:collapse;font-size:1px;"><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;line-height:normal;"><tr style="font-size:0;"><td align="left" style="padding:10px 0;vertical-align:top;"><p style="margin-top:0px;margin-bottom:0px;"><img src="cid:image870949.png@9BEC9255.0B0D42BA" width="125" height="40" border="0" alt="" style="width:125px;min-width:125px;max-width:125px;height:40px;min-height:40px;max-height:40px;font-size:0;" /></p></td></tr></table></td></tr><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;"><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;color:#000001;font-style:normal;font-weight:400;white-space:nowrap;"><tr style="font-size:14.67px;"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;">dr. ir.<span style="font-family:remialcxesans;font-size:1px;color:#FFFFFF;line-height:1px;">​<span style="font-family:'template-A7LWMTpBEe2ifABQ8nUoZA';">​</span><span style="font-family:'zone-1';">​</span><span style="font-family:'zones-AQ';">​</span></span> </p></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;">Christiaan</p></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;"> Klaij</p></td></tr></table></td><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;color:#000001;font-style:normal;font-weight:400;white-space:nowrap;"><tr style="font-size:14.67px;"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;"> | </p></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;">Senior Researcher</p></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;"> | </p></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;">Research & Development</p></td><td align="left" style="vertical-align:top;font-size:0;"></td></tr></table></td></tr></table></td></tr><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;"><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;color:#000001;font-style:normal;font-weight:400;white-space:nowrap;"><tr style="font-size:14.67px;"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;">T <a href="tel:+31%20317%2049%2033%2044" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;">+31 317 49 33 44</a></p></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;"> | </p></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;"> <a href="mailto:C.Klaij@marin.nl" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;">C.Klaij@marin.nl</a> </p></td><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><p style="margin-top:0px;margin-bottom:0px;">| <a href="https://urldefense.us/v3/__https://www.marin.nl/__;!!G_uCfscf7eWS!ci7RiI8WEqh81becsu6CMRqmK1It91JWMStWzWcFLARdy0n8d2WiqmINXWd-0992Ex6wcTfqupvy9nnMVdrITEk$" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;">www.marin.nl</a></p></td></tr></table></td></tr></table></td></tr><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;"><tr style="font-size:0;"><td align="left" style="padding:5px 0 0;vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;"><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;line-height:normal;"><tr style="font-size:0;"><td align="left" style="padding:0 3px 3px 0;vertical-align:top;"><p style="margin-top:0px;margin-bottom:0px;"><a href="https://urldefense.us/v3/__https://www.facebook.com/marin.wageningen__;!!G_uCfscf7eWS!ci7RiI8WEqh81becsu6CMRqmK1It91JWMStWzWcFLARdy0n8d2WiqmINXWd-0992Ex6wcTfqupvy9nnMJEayozg$" target="_blank" id="LPlnk689713" style="text-decoration:none;"><img src="cid:image753651.png@774551B4.82D3CA8E" width="15" height="15" border="0" title="Facebook" alt="Facebook" style="width:15px;min-width:15px;max-width:15px;height:15px;min-height:15px;max-height:15px;font-size:12px;" /></a></p></td></tr></table></td><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;line-height:normal;"><tr style="font-size:0;"><td align="left" style="padding:0 3px 3px 0;vertical-align:top;"><p style="margin-top:0px;margin-bottom:0px;"><a href="https://urldefense.us/v3/__https://www.linkedin.com/company/marin__;!!G_uCfscf7eWS!ci7RiI8WEqh81becsu6CMRqmK1It91JWMStWzWcFLARdy0n8d2WiqmINXWd-0992Ex6wcTfqupvy9nnMHWYJziY$" target="_blank" id="LPlnk689713" style="text-decoration:none;"><img src="cid:image316694.png@7CC98826.EB3BC7B6" width="15" height="15" border="0" title="LinkedIn" alt="LinkedIn" style="width:15px;min-width:15px;max-width:15px;height:15px;min-height:15px;max-height:15px;font-size:12px;" /></a></p></td></tr></table></td><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;font-size:0;line-height:normal;"><tr style="font-size:0;"><td align="left" style="padding:0 3px 3px 0;vertical-align:top;"><p style="margin-top:0px;margin-bottom:0px;"><a href="https://urldefense.us/v3/__https://www.youtube.com/marinmultimedia__;!!G_uCfscf7eWS!ci7RiI8WEqh81becsu6CMRqmK1It91JWMStWzWcFLARdy0n8d2WiqmINXWd-0992Ex6wcTfqupvy9nnMGp7QgsM$" target="_blank" id="LPlnk689713" style="text-decoration:none;"><img src="cid:image966725.png@B6A67284.C0F468AD" width="15" height="15" border="0" title="YouTube" alt="YouTube" style="width:15px;min-width:15px;max-width:15px;height:15px;min-height:15px;max-height:15px;font-size:12px;" /></a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></div></body></html>