comp.lang.ada
 help / color / mirror / Atom feed
* My Program Sourcecode has a Mind of its Own Suddenly.
@ 2012-08-25  8:30 Austin Obyrne
  2012-08-25 10:03 ` Simon Wright
  2012-08-25 17:51 ` Mark Murray
  0 siblings, 2 replies; 5+ messages in thread
From: Austin Obyrne @ 2012-08-25  8:30 UTC (permalink / raw)


My Program Sourcecode has a Mind of its Own Suddenly. 

I’m preparing program sourcecode in Ada-95 that will eventually be uploaded to my website http://www.adacryptpages.com for the perusal of crypto enthusiasts and suddenly my lines have started indenting themselves a bit more than I like.

I don’t know when or how this started but it is quite recent. I don’t recall doing anything that could have started it.

At first I thought this will stop when I rewrite my old stuff in a new folder but no, it is continuing – if for instance I copy and paste a procedure from another older folder into my present folder (still under construction) – the pasted source code appears as three spaces in from he left-hand edge when I would prefer it to to be my usual 2 spaces.

This I think is to do with my editor which is that which comes with the older gnat 311.p compiler.

I don’t want this to continue and would be grateful for your advice on what is causing it – I’m sure more experienced programmers will know how to stop it – any body please?

- adacrypyt 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: My Program Sourcecode has a Mind of its Own Suddenly.
  2012-08-25  8:30 My Program Sourcecode has a Mind of its Own Suddenly Austin Obyrne
@ 2012-08-25 10:03 ` Simon Wright
  2012-08-25 11:56   ` Austin Obyrne
  2012-08-25 12:37   ` Austin Obyrne
  2012-08-25 17:51 ` Mark Murray
  1 sibling, 2 replies; 5+ messages in thread
From: Simon Wright @ 2012-08-25 10:03 UTC (permalink / raw)


Austin Obyrne <austin.obyrne@hotmail.com> writes:

> At first I thought this will stop when I rewrite my old stuff in a new
> folder but no, it is continuing – if for instance I copy and paste a
> procedure from another older folder into my present folder (still
> under construction) – the pasted source code appears as three spaces
> in from he left-hand edge when I would prefer it to to be my usual 2
> spaces.
>
> This I think is to do with my editor which is that which comes with
> the older gnat 311.p compiler.

3-spaces is AdaCore's standard indentation, so GPS will format to that
unless you tell it different.

But for it to change just by copying from one folder to another - no!

I use -gnaty (default style checks) for my own projects, so I've become
accustomed to 3-spaces. Except on Stack Overflow, where Markdown uses a
minimum of 4-spaces for code inserts.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: My Program Sourcecode has a Mind of its Own Suddenly.
  2012-08-25 10:03 ` Simon Wright
@ 2012-08-25 11:56   ` Austin Obyrne
  2012-08-25 12:37   ` Austin Obyrne
  1 sibling, 0 replies; 5+ messages in thread
From: Austin Obyrne @ 2012-08-25 11:56 UTC (permalink / raw)


On Saturday, August 25, 2012 11:03:54 AM UTC+1, Simon Wright wrote:
> Austin Obyrne <austin.obyrne@hotmail.com> writes: > At first I thought this will stop when I rewrite my old stuff in a new > folder but no, it is continuing – if for instance I copy and paste a > procedure from another older folder into my present folder (still > under construction) – the pasted source code appears as three spaces > in from he left-hand edge when I would prefer it to to be my usual 2 > spaces. > > This I think is to do with my editor which is that which comes with > the older gnat 311.p compiler. 3-spaces is AdaCore's standard indentation, so GPS will format to that unless you tell it different. But for it to change just by copying from one folder to another - no! I use -gnaty (default style checks) for my own projects, so I've become accustomed to 3-spaces. Except on Stack Overflow, where Markdown uses a minimum of 4-spaces for code inserts.

Many Thanks for that very useful info.

Could you tell me how to override that default setting and go to two spaces?

Thanks  - Austin



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: My Program Sourcecode has a Mind of its Own Suddenly.
  2012-08-25 10:03 ` Simon Wright
  2012-08-25 11:56   ` Austin Obyrne
@ 2012-08-25 12:37   ` Austin Obyrne
  1 sibling, 0 replies; 5+ messages in thread
From: Austin Obyrne @ 2012-08-25 12:37 UTC (permalink / raw)


On Saturday, August 25, 2012 11:03:54 AM UTC+1, Simon Wright wrote:
> Austin Obyrne <austin.obyrne@hotmail.com> writes: > At first I thought this will stop when I rewrite my old stuff in a new > folder but no, it is continuing – if for instance I copy and paste a > procedure from another older folder into my present folder (still > under construction) – the pasted source code appears as three spaces > in from he left-hand edge when I would prefer it to to be my usual 2 > spaces. > > This I think is to do with my editor which is that which comes with > the older gnat 311.p compiler. 3-spaces is AdaCore's standard indentation, so GPS will format to that unless you tell it different. But for it to change just by copying from one folder to another - no! I use -gnaty (default style checks) for my own projects, so I've become accustomed to 3-spaces. Except on Stack Overflow, where Markdown uses a minimum of 4-spaces for code inserts.

Ignore that last - clearly overriding would mean just keying in at less than 3 spaces from LH side. Thank you - adacrypt



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: My Program Sourcecode has a Mind of its Own Suddenly.
  2012-08-25  8:30 My Program Sourcecode has a Mind of its Own Suddenly Austin Obyrne
  2012-08-25 10:03 ` Simon Wright
@ 2012-08-25 17:51 ` Mark Murray
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Murray @ 2012-08-25 17:51 UTC (permalink / raw)


On 25/08/2012 09:30, Austin Obyrne wrote:
> My Program Sourcecode has a Mind of its Own Suddenly.

Looking at how other folks write code is very often useful. Also,
seeing how some problems are solved in "standard" ways is often
helpful, too.

My Ada experince is minimal (I'm a software engineer, with C as my
main language), and I find this site:

http://rosettacode.org/wiki/Rosetta_Code

.. very useful as a starting point in getting going in other
languages. I wouldn't describe it as perfect, but when I need
a quick answer, it's very good.

I've learnt quite a bit of Ada from it.

M
-- 
Mark "No Nickname" Murray
Notable nebbish, extreme generalist.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-25 17:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-25  8:30 My Program Sourcecode has a Mind of its Own Suddenly Austin Obyrne
2012-08-25 10:03 ` Simon Wright
2012-08-25 11:56   ` Austin Obyrne
2012-08-25 12:37   ` Austin Obyrne
2012-08-25 17:51 ` Mark Murray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox