~sandy-dunlop/wildcatcobol/dev

« back to all changes in this revision

Viewing changes to src/Wildcat.Cobol.Compiler/ILGenerator/IO.cs

  • Committer: Sandy Dunlop
  • Date: 2007-09-06 08:37:30 UTC
  • Revision ID: sandyd@marvin.memex.co.uk-20070906083730-igth5168f6pq8i7q
Implementing more of sequential file writing

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                }
42
42
                return null;
43
43
        }
 
44
        
 
45
        private DataDescription GetDDEByName(string name)
 
46
        {
 
47
           return _program.VariableDeclarations[name] as DataDescription;
 
48
        }
44
49
        
45
50
        private string EmitOpenStatement(OpenStatement openStatement)
46
51
        {
230
235
            }else{
231
236
                //TODO: writeStatement.Filename is not correct here...
232
237
                
 
238
                System.Console.WriteLine("Processing WRITE statement");
 
239
                System.Console.WriteLine("RecordName = " + writeStatement.RecordName);
 
240
                DataDescription dde = GetDDEByName(writeStatement.RecordName.Name);
 
241
                if (dde==null)
 
242
                {
 
243
                    Console.WriteLine("dde is NULL");
 
244
                }
 
245
                
 
246
                //TODO: Get FSDE from DDE
 
247
                Console.WriteLine("dde.FSDE.Name.Value = " + dde.FSDE.Name.Value);
 
248
                
 
249
                
233
250
//              r += "        " + ILAddress(1) + "ldarg.0\n";
234
251
//              r += "        " + ILAddress(5);
235
252
//              r += "ldfld class [mscorlib]System.IO.StreamReader "+className+"::_writer_"+ILIdentifier(writeStatement.Filename.Name)+"\n";
236
253
                sources = new ArrayList();
237
 
                sources.Add(writeStatement.From);
 
254
                if (writeStatement.From!=null)
 
255
                {
 
256
                    sources.Add(writeStatement.From);
 
257
                }
 
258
                //TODO: What should be done when there are no FROM identifiers?
238
259
            }
239
260
            
240
261
            for (int i = 0; i < sources.Count; i++)