Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forward reference

 
Rastogi Manish
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can some body help me below code. It compile properly but it givec compile time error when I comment out SOP with reason illegal forward reference.



Thanks & Regards
Manish Rastogi
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are trying to use the variable a before it is declared. The forward referencing rule says that you cannot use a variable on the right hand side of an assignment statement or use it to print something before it can be declared.

Hope this helps.
 
Rastogi Manish
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok Thanks Sankararaj

Regards,
Manish Rastogi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic