投稿日 | : 2003/11/17(Mon) 17:23 |
投稿者 | : だだだ |
Eメール | : |
URL | : |
タイトル | : Re^2: Fuction,typeについて |
返信ありがとうございます。
KGさんの指摘道りに、宣言を上に出したら出来ました。
ありがとうございます。
>ついでに定義型を定義しているだけで、どこでも実現していないように見えます。
確かにそうだったので、一応その部分も解消されました。
最後に
>また関数内部での
> datNow = Now
> datBarth = intAge
>は、NowとintAgeはDate型ですが、代入先がDate型ではないため
>変換エラーがおきます。
>構造体のメンバごとに代入を書いていってください。
この部分なのですが、
一括で構造体の中に入れる事は出来ないでしょうか?
今のソースはこんな感じになりました。
Type datNow
yNow As Integer
str1Barth As String
mNow As Integer
str2Barth As String
dNow As Integer
End Type
Type datBarth
yBarth As Integer
str1Barth As String
mBarth As Integer
str2Barth As String
dBarth As Integer
End Type
Public Function funAge(intAge As Date) As String
Dim zzz As datNow
Dim xxx As datBarth
xxx = intAge
End Function