comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » endi and endif
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
endi and endif [message #84864] Fri, 14 June 2013 13:00 Go to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
OK I'm sure I am missing something obvious here

When I am typing into the workbench editor, and enter an "if" clause

"if a eq 3 then begin "

the editor automatically adds a subsequent "endi". This is fine but I don't know any IDL words spelled "endi" so I manually add the missing "f" at the end to make an "endif". But now the program no longer compiles.

To add to the confusion, if I am working from the command line and a stand-alone editor, the program will compile with "endif" but not with "endi"!! The following program will not compile.

pro test
if !Const.pi lt 3 then begin
print,'All is well'
endi
return
end

My only guess at this point is that in the workbench "endi" has a special meaning.
Re: endi and endif [message #84867 is a reply to message #84864] Fri, 14 June 2013 14:01 Go to previous messageGo to next message
Bill Nel is currently offline  Bill Nel
Messages: 31
Registered: October 2010
Member
> When I am typing into the workbench editor, and enter an "if" clause
> "if a eq 3 then begin "
> the editor automatically adds a subsequent "endi".

I get the expected "endif" on my system.

IDL> help, !version
** Structure !VERSION, 8 tags, length=104, data length=100:
ARCH STRING 'x86_64'
OS STRING 'Win32'
OS_FAMILY STRING 'Windows'
OS_NAME STRING 'Microsoft Windows'
RELEASE STRING '8.2.3'
BUILD_DATE STRING 'May 3 2013'
MEMORY_BITS INT 64
FILE_OFFSET_BITS
INT 64
Re: endi and endif [message #84868 is a reply to message #84867] Fri, 14 June 2013 14:16 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Friday, June 14, 2013 5:01:56 PM UTC-4, ri...@crd.ge.com wrote:

>
> I get the expected "endif" on my system.
>
>

Thanks, I've discovered that my workbench editor ( { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64} ) can get into a mode where the final "f" is really there but not visible. Then when I add my own "f" it becomes "endiff" and no longer compiles. This doesn't always happen but has happened several times in the past few months.

An alternative explanation is that I've started hallucinating. I haven't completely ruled this out yet, but if true I hope I would have had more interesting hallucinations. --Wayne

>
> IDL> help, !version
>
> ** Structure !VERSION, 8 tags, length=104, data length=100:
>
> ARCH STRING 'x86_64'
>
> OS STRING 'Win32'
>
> OS_FAMILY STRING 'Windows'
>
> OS_NAME STRING 'Microsoft Windows'
>
> RELEASE STRING '8.2.3'
>
> BUILD_DATE STRING 'May 3 2013'
>
> MEMORY_BITS INT 64
>
> FILE_OFFSET_BITS
>
> INT 64
Re: endi and endif [message #84869 is a reply to message #84868] Fri, 14 June 2013 14:21 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Friday, June 14, 2013 3:16:47 PM UTC-6, wlandsman wrote:
> On Friday, June 14, 2013 5:01:56 PM UTC-4, ri...@crd.ge.com wrote:
>
>
>
>>
>
>> I get the expected "endif" on my system.
>
>>
>
>>
>
>
>
> Thanks, I've discovered that my workbench editor ( { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64} ) can get into a mode where the final "f" is really there but not visible. Then when I add my own "f" it becomes "endiff" and no longer compiles. This doesn't always happen but has happened several times in the past few months.
>
>
>
> An alternative explanation is that I've started hallucinating. I haven't completely ruled this out yet, but if true I hope I would have had more interesting hallucinations. --Wayne
>
>
>
>>
>
>> IDL> help, !version
>
>>
>
>> ** Structure !VERSION, 8 tags, length=104, data length=100:
>
>>
>
>> ARCH STRING 'x86_64'
>
>>
>
>> OS STRING 'Win32'
>
>>
>
>> OS_FAMILY STRING 'Windows'
>
>>
>
>> OS_NAME STRING 'Microsoft Windows'
>
>>
>
>> RELEASE STRING '8.2.3'
>
>>
>
>> BUILD_DATE STRING 'May 3 2013'
>
>>
>
>> MEMORY_BITS INT 64
>
>>
>
>> FILE_OFFSET_BITS
>
>>
>
>> INT 64

Hey Wayne,
That's really cool. I've never heard of this bug. If you could let us know what you are doing to get into this state, that would be helpful. Not the hallucinating state, just the Workbench state.
-Chris
Re: endi and endif [message #84870 is a reply to message #84869] Fri, 14 June 2013 15:27 Go to previous messageGo to next message
jeffnettles4870 is currently offline  jeffnettles4870
Messages: 111
Registered: October 2006
Senior Member
On Friday, June 14, 2013 5:21:35 PM UTC-4, Chris Torrence wrote:
> On Friday, June 14, 2013 3:16:47 PM UTC-6, wlandsman wrote:
>
>> On Friday, June 14, 2013 5:01:56 PM UTC-4, ri...@crd.ge.com wrote:
>
>>
>
>>
>
>>
>
>>>
>
>>
>
>>> I get the expected "endif" on my system.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>
>
>>
>
>> Thanks, I've discovered that my workbench editor ( { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64} ) can get into a mode where the final "f" is really there but not visible. Then when I add my own "f" it becomes "endiff" and no longer compiles. This doesn't always happen but has happened several times in the past few months.
>
>>
>
>>
>
>>
>
>> An alternative explanation is that I've started hallucinating. I haven't completely ruled this out yet, but if true I hope I would have had more interesting hallucinations. --Wayne
>
>>
>
>>
>
>>
>
>>>
>
>>
>
>>> IDL> help, !version
>
>>
>
>>>
>
>>
>
>>> ** Structure !VERSION, 8 tags, length=104, data length=100:
>
>>
>
>>>
>
>>
>
>>> ARCH STRING 'x86_64'
>
>>
>
>>>
>
>>
>
>>> OS STRING 'Win32'
>
>>
>
>>>
>
>>
>
>>> OS_FAMILY STRING 'Windows'
>
>>
>
>>>
>
>>
>
>>> OS_NAME STRING 'Microsoft Windows'
>
>>
>
>>>
>
>>
>
>>> RELEASE STRING '8.2.3'
>
>>
>
>>>
>
>>
>
>>> BUILD_DATE STRING 'May 3 2013'
>
>>
>
>>>
>
>>
>
>>> MEMORY_BITS INT 64
>
>>
>
>>>
>
>>
>
>>> FILE_OFFSET_BITS
>
>>
>
>>>
>
>>
>
>>> INT 64
>
>
>
> Hey Wayne,
>
> That's really cool. I've never heard of this bug. If you could let us know what you are doing to get into this state, that would be helpful. Not the hallucinating state, just the Workbench state.
>
> -Chris

For what it's worth, this has happened to me before also. I didn't save any details of what i was doing or anything, so i can't recreate it (helpful i know!), but i do remember it happening. I'm pretty sure i had to restart IDL to get it to compile with "endif" and not "endi".

Jeff
Re: endi and endif [message #85062 is a reply to message #84870] Fri, 28 June 2013 05:49 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Saturday, June 15, 2013 12:27:25 AM UTC+2, Jeff N. wrote:
> On Friday, June 14, 2013 5:21:35 PM UTC-4, Chris Torrence wrote:
>
>> On Friday, June 14, 2013 3:16:47 PM UTC-6, wlandsman wrote:
>
>>
>
>>> On Friday, June 14, 2013 5:01:56 PM UTC-4, ri...@crd.ge.com wrote:
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> I get the expected "endif" on my system.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Thanks, I've discovered that my workbench editor ( { x86_64 darwin unix Mac OS X 8.2.3 May 2 2013 64 64} ) can get into a mode where the final "f" is really there but not visible. Then when I add my own "f" it becomes "endiff" and no longer compiles. This doesn't always happen but has happened several times in the past few months.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> An alternative explanation is that I've started hallucinating. I haven't completely ruled this out yet, but if true I hope I would have had more interesting hallucinations. --Wayne
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> IDL> help, !version
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> ** Structure !VERSION, 8 tags, length=104, data length=100:
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> ARCH STRING 'x86_64'
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> OS STRING 'Win32'
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> OS_FAMILY STRING 'Windows'
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> OS_NAME STRING 'Microsoft Windows'
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> RELEASE STRING '8.2.3'
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> BUILD_DATE STRING 'May 3 2013'
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> MEMORY_BITS INT 64
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> FILE_OFFSET_BITS
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> INT 64
>
>>
>
>>
>
>>
>
>> Hey Wayne,
>
>>
>
>> That's really cool. I've never heard of this bug. If you could let us know what you are doing to get into this state, that would be helpful. Not the hallucinating state, just the Workbench state.
>
>>
>
>> -Chris
>
>
>
> For what it's worth, this has happened to me before also. I didn't save any details of what i was doing or anything, so i can't recreate it (helpful i know!), but i do remember it happening. I'm pretty sure i had to restart IDL to get it to compile with "endif" and not "endi".
>
>
>
> Jeff

Hi,
the same just happened to me, but with the R in ENDFOR.
So the workbench displays
FOR j=0,N_ELEMENTS(SubSet)-1 DO BEGIN
...MY LOOP IN HERE...
ENDFO

And it compiles. If I add an F to ENDFO, it does not compile and throws an error. Furthermore the color of the ENDFO is switched from that of a control statement to that of a normal variable.

IDL> print, !version
{ x86_64 Win32 Windows Microsoft Windows 8.2.3 May 3 2013 64 64}

Has anybody any insight in how this happens and how one gets rid of it?
This happened after a lunch break. The pc was in sleep mode in the meanwhile.

Cheers,
Helder
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: k-d tree IDL implementation
Next Topic: pass parameters to a function when calling BROYDEN or NEWTON routines

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:52:49 PDT 2025

Total time taken to generate the page: 0.00498 seconds