Code segment too long - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Code segment too long

MaStMuNdAMaStMuNdA Posts: 17Member
now i ahev another problem where at the end of a procedure i get an error 'code segment too long'

i had this error at the end of my main program but i deleted extra spaces and also i shorted some of my coding. but now i cam stuck :(

any suggestions?

Comments

  • steveXPsteveXP Posts: 22Member
    : now i ahev another problem where at the end of a procedure i get an error 'code segment too long'
    :
    : i had this error at the end of my main program but i deleted extra spaces and also i shorted some of my coding. but now i cam stuck :(
    :
    : any suggestions?
    :
    Hey there. Because you say you compile your program and get the Code Segment error i assume your code segment error is nothing to do with recursion. To fix your error you could try breaking your program down into Units and If this doesn't work try using the overlays unit. Hopefully that helps ya.

    SteveXp o(-_-)o
  • MaStMuNdAMaStMuNdA Posts: 17Member
    : : now i ahev another problem where at the end of a procedure i get an error 'code segment too long'
    : :
    : : i had this error at the end of my main program but i deleted extra spaces and also i shorted some of my coding. but now i cam stuck :(
    : :
    : : any suggestions?
    : :
    : Hey there. Because you say you compile your program and get the Code Segment error i assume your code segment error is nothing to do with recursion. To fix your error you could try breaking your program down into Units and If this doesn't work try using the overlays unit. Hopefully that helps ya.
    :
    : SteveXp o(-_-)o
    :

    the thing is i dont knwo how to do units :'(

    can u plz tell me how to do them?
  • Phat NatPhat Nat Posts: 757Member
    : : : now i ahev another problem where at the end of a procedure i get an error 'code segment too long'
    : : :
    : : : i had this error at the end of my main program but i deleted extra spaces and also i shorted some of my coding. but now i cam stuck :(
    : : :
    : : : any suggestions?
    : : :
    : : Hey there. Because you say you compile your program and get the Code Segment error i assume your code segment error is nothing to do with recursion. To fix your error you could try breaking your program down into Units and If this doesn't work try using the overlays unit. Hopefully that helps ya.
    : :
    : : SteveXp o(-_-)o
    : :
    :
    : the thing is i dont knwo how to do units :'(
    :
    : can u plz tell me how to do them?

    Just put procedures that you use all the time into them. this is the format:

    [code]
    UNIT unitname;

    INTERFACE { Anything in here is available to other programs }

    PROCEDURE AnyProceduresThatYouWantToUse;

    IMPLEMENTATION { Anything in here is not available to other programs }

    { Define the Procedure Here }
    PROCEDURE AnyProceduresThatYouWantToUse;
    Begin
    Writeln('PROCEDURE!');
    End;

    Begin
    End.
    [/code]

    Sorry, I have to run. This is the basics, hope it helps.

    Phat Nat
Sign In or Register to comment.