Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

Superfluous tokens & failure to diagnose

IanH
Honored Contributor III
469 Views

Short and sweet.

  PRINT "(A)", 'There is something ' & &
    // 'wrong with this statement.'
END
>ifort /c /check:all /warn:all /standard-semantics /stand "2014-08-27 AFewTooMany.f90"
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.0.108 Build 20140726
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.
>

 

0 Kudos
1 Reply
Steven_L_Intel1
Employee
469 Views

I could interpret the standard as saying this is legal. The standard says:

If a noncharacter context is to be continued, an "&" shall be the last nonblank character on the line, or the last nonblank character before an "!".

Well, the last nonblank character is "&" - just not the same one that started continuation. I don't see any words in the standard to prohibit more than one &. Amusing. I will have to ask the committee what they think.

0 Kudos
Reply