Problem with Propellent (tabs in text)
Rayman
Posts: 14,889
Just overcame (I think) an issue with Propellent (and I guess SPIN in general...).
When there's a compilation error, you can use SrcStart and SrcCount to figure out the string that caused the error.
The usage notes does imply that the <CR><LF> combination is replaced with <CR>.
But, it doesn't mention that <TAB> is replaced with 8 spaces.
Actually, TAB is a real problem with SPIN! I just realized that if the compiler is replacing tabs with 8 spaces before analyzing, then there are potential heirarchy problems...
Anyway, for VisualSpin, I've decided to try replacing <TAB> with 5 spaces before compile. This is my editor window tab setting. But, I'm not sure that guarantees things come out right...
When there's a compilation error, you can use SrcStart and SrcCount to figure out the string that caused the error.
The usage notes does imply that the <CR><LF> combination is replaced with <CR>.
But, it doesn't mention that <TAB> is replaced with 8 spaces.
Actually, TAB is a real problem with SPIN! I just realized that if the compiler is replacing tabs with 8 spaces before analyzing, then there are potential heirarchy problems...
Anyway, for VisualSpin, I've decided to try replacing <TAB> with 5 spaces before compile. This is my editor window tab setting. But, I'm not sure that guarantees things come out right...
Comments
1. When the user hits the tab key, insert some number of spaces to give the appearance of a tab. (I think this is what Parallax does.)
2. Put the tabs in, but at compile time create a duplicate with all the tabs replaced with the appropriate number of spaces. This is what I'm going to try...
-Phil
I really like using backspace to untab. You can to this in MS Visual Studio and I like it better that way...
But, I'm still a little on the fence and may revert to #1...
Decided you're right and it's safer to not have any tabs in the text. So, I've changed the edit control to insert 5 spaces instead of the tab key. But, I'm not happy with this predicament...